At 21:09 +0200 6/16/03, Fernando Martins wrote:
In AUTO_INCREMENT fields, inserting a 0 into the field requests a new
sequence number.

Is it possible to turn off this behaviour? (without messing with the code,
of course)

No.



Using NULL to get the next sequence number is good enough for me and I use quite a lot 0 for special purposes (default record values,...)

That is an unsupported use of an AUTO_INCREMENT column, which is intended to hold only positive integer values. Not negative values, and not zero.

(You will find, for example, that if you run CHECK TABLE on your table,
it will complain about 0 values in an AUTO_INCREMENT column.  Also,
dumping and restoring the table will change your zero values.)


TIA, Fernando Martins


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


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



Reply via email to