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>
相關文章
相關標籤/搜索