您现在的位置是: 首页 > MySQL MySQL
mysql重建主键ID
冬寂
2020-08-06 13:33:10
【MySQL】
854人已围观
删除原有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取随机数据
相关文章
随机图文
-
apache的ab命令压测
ab是apache自带的压力测试工具。ab非常实用,它不仅可以对apache服务器进行网站访问压力测试,也可以对或其它类型的服务器进行压力测试。比如nginx、tomcat、IIS等 -
linux: ln添加软链ln添加软链
ln -s 软链接文件目录【绝对路径】 软链接名字(请在要创建软链接的文件中执行该命令,软链接会创建在该文件中) -
ThinkPHP6-入门笔记
ThinkPHP6-入门笔记 -
记两个函数round()和number_format().number_format取消千分位
记两个函数round()和number_format().number_format取消千分位