Gary Smith skrev:

...

An example of where it wouldn't be: Although ID is auto_increment, you could define a row as, say, '10005583429'. This would be a valid input. Selecting max(id) would return that number. However, auto_increment wouldn't change - it would still be '34' (or whatever) for the next line.

Not quite...

CREATE TABLE t (id bigint unsigned primary key auto_increment);
INSERT INTO t VALUES (10005583429);
INSERT INTO t VALUES (null);
SELECT * FROM t;

+-------------+
| id          |
+-------------+
| 10005583429 |
| 10005583430 |
+-------------+
2 rows in set (0.00 sec)


/ Carsten


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to