- 新建一个表并备份旧表数据
create table table_new select *
from table_old
- 获取两个表之间的差集
select * from table_1 where id not in (select id from table_2 )
create table table_new select *
from table_old
select * from table_1 where id not in (select id from table_2 )