Description:
mysql> create table test2 (a int NOT NULL AUTO_INCREMENT primary key,b int) AUTO_INCREMENT=10;
Query OK, 0 rows affected (0.01 sec)
mysql> insert into test2(b) values(1);
Query OK, 1 row affected (0.01 sec)
mysql> select * from test2;
+----+------+
| a | b |
+----+------+
| 10 | 1 |
+----+------+
1 row in set (0.00 sec)
mysql> create table test3 like test2;
Query OK, 0 rows affected (0.02 sec)
mysql> show create table test3;
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| test3 | CREATE TABLE `test3` (
`a` int NOT NULL AUTO_INCREMENT,
`b` int DEFAULT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> show create table test2;
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| test2 | CREATE TABLE `test2` (
`a` int NOT NULL AUTO_INCREMENT,
`b` int DEFAULT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
How to repeat:
As the description.