大数据量切换表格
CREATE TABLE his_pos (LIKE his_truck_pos);
-- 插入筛选数据
INSERT into his_pos (SELECT * from his_truck_pos where create_time >'2023-07-28 00:00:00' and create_time<'2023-08-03 00:00:00');
-- 重命名,替换
rename table his_truck_pos to his_truck_pos_delete;
rename table his_pos to his_truck_pos;
-- 删除旧表
DROP TABLE tableC;
大数据量切换表格的数据库命令
最新推荐文章于 2024-09-15 08:03:51 发布