| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Paul DuBois | Date: | July 15 1999 2:52pm |
| Subject: | Re: Unique ID Generation | ||
| View as plain text | |||
At 10:36 AM -0400 7/15/99, PinkeshP@stripped wrote: >can anyone give me idea on generating unique id in the record? >i was thinking of >MINUTE(NOW())*SECOND(NOW())*HOUR(NOW())*DAYOFMONTH(CURDATE())*MONTH(CURDATE()) >*rand()*10 > >is it safe enough to generate unique id like this? No. Since RAND() is random, there is no guarantee it will be unique, although one would suppose it would be good enough. Do you have some particular reason to not simply use an AUTO_INCREMENT column? -- Paul DuBois, paul@stripped
| Thread | ||
|---|---|---|
| • Unique ID Generation | PinkeshP | 15 Jul |
| • Re: Unique ID Generation | Paul DuBois | 15 Jul |
| • RE: Unique ID Generation | Don Read | 15 Jul |
| • RE: Unique ID Generation | Don Read | 15 Jul |
| • Re: Unique ID Generation | Daevid Vincent | 16 Jul |
| • RE: Unique ID Generation | Lincoln Yeoh | 16 Jul |
| • Re: Unique ID Generation | Daevid Vincent | 16 Jul |
| • Re: Unique ID Generation | Daevid Vincent | 16 Jul |
| • Re: Unique ID Generation | Kevin Smith | 15 Jul |
