修改mysql自增字段的方法
修改mysql自增字段的方法
修改 test_user 库 user 表 auto_increment为 10000(从10000开始递增)
<pre>
mysql> alter table test_user.user auto_increment=10000;
Query OK, 0 rows affected (0.12 sec)
Records: 0 Duplicates: 0 Warnings: 0
//查看递增
mysql> select auto_increment from information_schema.tables where table_schema='test_user' and table_name='user';
+----------------+
| auto_increment |
+----------------+
| 10000 |
+----------------+
1 row in set (0.04 sec)
</pre>
如果遇到什么不懂的地方直接关注公众号留言(本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利。)
作者:newmiracle
出处:https://www.cnblogs.com/newmiracle/