--1、 select * from a where exists(select 1 from b where a.a=a and a.b=b)--2、 insert into b select * from a where not exists(select 1 from b where a.a=a and a.b=b)
TO:背着灵魂漫步 select 1是什么意思啊
1\ select * from A,B wher A.a=B.b2\ insert into B (select * from A where A.a<>B.b)
--1、
select * from a where exists(select 1 from b where a.a=a and a.b=b)--2、
insert into b select * from a
where not exists(select 1 from b where a.a=a and a.b=b)
select * from A,B wher A.a=B.b2\
insert into B (select * from A where A.a<>B.b)
上面的 1\ 的 where 掉了个 e你试试看,是不是你要的效果
select 1 只是判断是否有满足条件的值。1是一个数字,随便写的,写成2也可以