If this value is larger than the current sequence counter, subsequent automatically generated values begin with the value plus one
mysql>
mysql> CREATE TABLE t (id INT AUTO_INCREMENT, PRIMARY KEY (id));
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> INSERT INTO t (id) VALUES(NULL),(NULL),(17),(NULL),(NULL);
Query OK, 5 rows affected (0.00 sec)
Records: 5 Duplicates: 0 Warnings: 0
mysql> SELECT id FROM t;
+----+
| id |
+----+
| 1 |
| 2 |
| 17 |
| 18 |
| 19 |
+----+
5 rows in set (0.00 sec)
mysql>
mysql> drop table t;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category