sql 将表B中不存在表A的数据 插入到表A中
insert into tableA
select * from tableB b where not exists(select 1 from tableA a where a.id = b.id)
insert into tableA
select * from tableB b
left join tableA a on a.id = b.id
where a.id is null
sql 将表B中不存在表A的数据 插入到表A中insert into tableA insert into tableA
|