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

猜你喜欢

转载自www.cnblogs.com/newmiracle/p/11865558.html