Hi, I'am using autoincrement field with innodb table. (Mysql 3.23.47-log on Linux ppc)
Two questions 1_ how to set a range ? Is the only solution chosing betwwen tinyint, smallint, ..., bigint I over words : I want a range from 1 to 9999999 for example , how can I do ? 2_ What's happens when the highest value is reached I have made a try with : create table Generator (Sequence smallint(7) zerofill unique primary key not null auto_increment ) type=innodb ; insert into Generator values(null); update Generator set Sequence=LAST_INSERT_ID(Sequence+1) ; Everything works fine, ok now what happens for the highest value ? update Generator set Sequence=65535 ; select * from Generator ; +----------+ | Sequence | +----------+ | 0065535 | +----------+ update Generator set Sequence=LAST_INSERT_ID(Sequence+1) ; select * from Generator ; +----------+ | Sequence | +----------+ | 0065535 | +----------+ Here something doesn't work, or I probably not undestood ! Thank you for any help -- Bernard CHAMBON IN2P3 / CNRS (Centre de Calcul de LYON) Tél : 04 72 69 42 18 http://www.in2p3.fr/CC --------------------------------------------------------------------- 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