create table 新表的名称 select * from 被拆分的表 order by id limit int1,int2
int1为其实位置,int2为几条
注意:这样拆分后主键会失效手动让其主键生效即可所有要执行
alter table 新表的名称 modify 主键字段 int primary key auto_increment
create table 新表的名称 select 需保留的字段 from 被拆分的表
拆分后原表都要保存
主要是把经常查的数据放在一个表里,不经常查的数据不做处理
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有