Reply to Re: MySQL : use of create sequence statement

Your name:

Reply:


Posted by J.O. Aho on 11/20/06 21:15

JM wrote:
> For a unique id we don't want to use an auto_increment, but want to
> construct a unique id incorporating a sequence (combination of letters
> and a number) to make it more meaningful and to distinguish between
> different projects and servers (alternative would be to create primary
> key on more than one field). Using Google and the PEAR manual I found
> the create sequence statement for MySQL. The create sequence statement
> is mentioned on dev.mysql.com but not in the MySQL manual.
> How come ? Is it dangerous to use it ? Prone to errors ? Bad programming
> style ?
> Or did they forget to mention it ?

Speculations from my side: it can generate non unique sequences, which would
require you to make some error checking and if the sequence already used, then
generate a new one and retry.


//Aho

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация