Last updated on JUNE 09, 2016
Applies to:MySQL Server - Version 4.0 and later
Information in this document applies to any platform.
Zero is used as a literal value for auto_increment columns
The manual states on an INSERT into an auto_increment column, 0 is treated exactly in the same way as NULL, that is, 0 should be replaced with the next sequence number.
Yet '0' itself is inserted:
mysql> insert into t2 (a,b) values(0,0);
Query OK, 1 row affected (0.01 sec)
| a | b |
| 0 | 0 |
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms