日期:2014-05-18  浏览次数:20523 次

INSERT INTO SELECT问题?
INSERT INTO SELECT问题?
table1,table2,tabel3都有身份证字段sfzh,
我想tabel1在tabel3中没有的数据sfzh都插入table2中,用INSERT INTO SELECT能解决吗,怎样写

------解决方案--------------------
SQL code
insert into table2(sfzh) select sfzh from tabel1 where sfzh not in (select sfzh from tabel3)