您现在的位置是: 首页 > MySQL MySQL
mysql重建主键ID
冬寂
2020-08-06 13:33:10
【MySQL】
5906人已围观
删除原有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取随机数据
相关文章
随机图文
-
执行40秒断开,90秒断开,自动断开,解决 PHP 执行时间过长导致断开连接的问题
当遇到 PHP 脚本执行时间超过40秒导致断开连接的问题时,通常需要调整相关的服务器和 PHP-FPM(FastCGI Process Manager)配置。 -
Docker部署Minio控制台域名访问和https
Docker部署Minio控制台域名访问和https -
Disco Diffusion:初次尝试,我的第一个作品,AI制图
Disco Diffusion:初次尝试,我的第一个作品,AI制图 -
房产-债务逻辑
别看房地产相关的债务结构层层嵌套,看上去很复杂,其实它最大的作用,就是把你现在的和未来的钱都拿出来,交到zf手上,zf再通过扩大投资,拉动经济增长——这就是“房地产尿壶”的真正用法。
