Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: randomly generate unique key

RE: randomly generate unique key

From: Mark Moynahan <Mark.Moynahan_at_apollogrp.edu>
Date: Fri, 30 May 2003 10:14:43 -0800
Message-ID: <F001.005A71CC.20030530101443@fatcity.com>


One way to get around this issue is to continue to use the sequence and concatenate some random numbers. The random generated number could look something like this sequence.nextval||to_char(sysdate,'DDDSSSSS').

Mark

-----Original Message-----
Sent: Friday, May 30, 2003 8:45 AM
To: Multiple recipients of list ORACLE-L

Hi List,

Originally, Our next generate directory group use sequence # to generate a unique key. (we can't use emplid or social s # as key, since students doesn't have emplid and some foreign students doesn't have ssn). That works fine until the policy changed, they need to publish the unique key which is trunk id. According to the developers, if publish those sequenced unique key, it will create some problems, since the community can guess the next sequence # and got unnecessary info associated with it. Now the question is how to create a random unique key? The idea is create a function call combine the 3 components (date, time, MAC address) to generate a random #. Does the date/time (client query system time)can always be unique or can be duplicated? Does someone has any idea or experience to generate those randomly unique key?

Any info would be helpful.

Thanks in advance,

Joan
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Joan Hsieh
  INET: joan.hsieh_at_tufts.edu

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Mark Moynahan
  INET: Mark.Moynahan_at_apollogrp.edu
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Fri May 30 2003 - 13:14:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US