如果是有多列的话,就指定列insert into tb1(fhh) select jwsx# from tb2
--将tb2中不包含在tb1中的数据插入tb1 create table tb1 (fhh varchar(100))create table tb2 (jwsx# varchar(100))insert into tb1 select '203271' insert into tb2 select '203187'insert into tb1 select * from tb2 t1 where not exists(select 1 from tb1 where fhh=t1.jwsx#)
insert into tb1 select * from tb2 t where not exists(select 1 from tb1 where fhh=t.jwsx#)
insert into tb1 select * from tb2 t where not exists(select 1 from tb1 where fhh=t.jwsx#)
select * from tb2
select jwsx# from tb2
create table tb1
(fhh varchar(100))create table tb2
(jwsx# varchar(100))insert into tb1 select '203271'
insert into tb2 select '203187'insert into tb1
select * from tb2 t1 where not exists(select 1 from tb1 where fhh=t1.jwsx#)
select * from tb2 t where not exists(select 1 from tb1 where fhh=t.jwsx#)