Re: generating random integer id
Hi, If you are generating the id yourself a good strategy is to use UUID that are "guaranteed" to be "universally" unique. If you are developing for the Microsoft platform, there is an API functions that returns you a UUID and this number is guaranteed to be unique. If you are working in Java, you can download the source code of a UUID generator. Bye, --- Tom Gao <[EMAIL PROTECTED]> wrote: > hi guys, > > I'm trying to generate randomly a number as the > primary key the key is to > be an integer in mysql. So like auto_increment I can > insert values and the > pk can be generated automatically. > > could someone point me to the right direction > please > > thanks > Tom > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list > archive) > > To request this thread, e-mail > <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: > http://lists.mysql.com/php/unsubscribe.php > __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: generating random integer id
I wish to use mysql to do the rand id generation... Tom - Original Message - From: "David Lloyd" <[EMAIL PROTECTED]> To: "Tom Gao" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, August 17, 2002 11:59 PM Subject: Re: generating random integer id > > [ mysql, query ] > > > could someone point me to the right direction please > > Are you generating it in MySQL (using sql) or are you using a > programming language to do it? > > DSL - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: generating random integer id
[ mysql, query ] > could someone point me to the right direction please Are you generating it in MySQL (using sql) or are you using a programming language to do it? DSL - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: generating random integer id
hi guys, I'm trying to generate randomly a number as the primary key the key is to be an integer in mysql. So like auto_increment I can insert values and the pk can be generated automatically. could someone point me to the right direction please thanks Tom - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php