Scott Haneda <[EMAIL PROTECTED]> wrote:
> on 06/23/2004 12:14 AM, Joe Wong at [EMAIL PROTECTED] wrote:
> 
>>   If it possible to limit the max value of an auto increment field to say,
>> 9999,9999 and how to do it? I am using MySQL 4.0.18.

No. The maximum value for the auto_increment column can be limited by the maximum 
value of the column type(tinyint, int, mediumint etc.). 

> 
> I am not sure, as a 'hack' you could simply insert a blank record with the
> value set to 9999,9999, once you reach that limit and try to insert a
> record, a error would be generated, no new records would be able to be
> inserted until this was resolved.

It will not work, because if you insert dummy row and set auto_increment value to 
9999, the next generated auto_increment value will be 10000.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to