Mysql 重新设置自增从某个值开始

sql: alter table 表名 auto_increment=数字

alter table sysuser_account auto_increment=45; //设置sysuser_account表从45开始自增

查看自增:
SELECT Auto_increment FROM information_schema.TABLES WHERE Table_Schema=‘数据库名’ AND table_name = ‘表名’ limit 1

SELECT Auto_increment FROM information_schema.`TABLES` WHERE Table_Schema='vfone' AND table_name = 'sysuser_account' limit 1;
发布了36 篇原创文章 · 获赞 4 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/m0_37826705/article/details/98481698