Mysql经常使用语句

mysql修改auto_increment,测试经常使用。 mysql

mysql> select auto_increment from information_schema.tables where table_name="users";
+----------------+
| auto_increment |
+----------------+
|           NULL |
|              9 |
+----------------+
2 rows in set (0.00 sec)

mysql> alter table users auto_increment = 0;
Query OK, 0 rows affected (0.00 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> select auto_increment from information_schema.tables where table_name="users";
+----------------+
| auto_increment |
+----------------+
|           NULL |
|              1 |
+----------------+
2 rows in set (0.00 sec)

mysql>
相关文章
相关标签/搜索