您现在的位置是: 首页 > MySQL MySQL
mysql重建主键ID
冬寂
2020-08-06 13:33:10
【MySQL】
6446人已围观
删除原有ID列:
alter table order_shbk drop id;
重建ID列,现在ID全部为0
alter table order_shbk add id int(11) not null first;
设置ID主键自增:
alter table order_shbk modify column id int( 11 ) not null auto_increment,add primary key(id);
alter table order_shbk drop id;
alter table order_shbk add id int(11) not null first;
alter table order_shbk modify column id int( 11 ) not null auto_increment,add primary key(id);
上一篇: NOSQL数据库之 - Redis(1)
下一篇: MYSQL取随机数据
相关文章
随机图文
-
PHP二维数排序,组根据某个字段排序
二维数组根据某个字段排序有两种办法,一种是通过sort自己写代码,一种是直接用array_multisort排序函数 -
执行40秒断开,90秒断开,自动断开,解决 PHP 执行时间过长导致断开连接的问题
当遇到 PHP 脚本执行时间超过40秒导致断开连接的问题时,通常需要调整相关的服务器和 PHP-FPM(FastCGI Process Manager)配置。 -
windows+PHP+shell_exec()无法执行的原因
windows+PHP+shell_exec()无法执行的原因 -
《好能量:代谢与无限健康的惊人联系》一
《好能量:代谢与无限健康的惊人联系》
