首页 > 数据库技术 > 详细

修改mysql自增字段的方法

时间:2019-11-15 12:29:04      阅读:98      评论:0      收藏:0      [点我收藏+]

修改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>

修改mysql自增字段的方法

原文:https://www.cnblogs.com/newmiracle/p/11865558.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!