您现在的位置是: 首页 > MySQL MySQL
mysql重建主键ID
冬寂
2020-08-06 13:33:10
【MySQL】
5912人已围观
删除原有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取随机数据
相关文章
随机图文
-
windows+PHP+shell_exec()无法执行的原因
windows+PHP+shell_exec()无法执行的原因 -
设备识别,layui设备识别layui.device()
设备识别,layui设备识别layui.device() -
Context Switching(上下文切换)的“切换成本”
在不同项目或任务之间切换时,为了恢复思路、加载代码上下文、调整工具环境而产生的时间与认知消耗 -
采集与优化
关键词。每一个人搜索一个关键词时,就表明Ta对这个词相关的内容有需求。而且,使用搜索引擎的人,通常是有问答需求、检索查询需求。当然搜索引擎内部肯定有非常庞大的分析系统,对这些需求进行精确的定位,详见百度指数。
