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
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3