insert B
select * from A
where not exists(select 1
from B
where id=A.id
and name=A.name
and address=A.address
and idcard=A.idcard)
select * from A
where not exists(select 1
from B
where id=A.id
and name=A.name
and address=A.address
and idcard=A.idcard)
例如A表一条记录
1001,小李,人民路,88888888
B一条记录
1001,小李,新华路,7777777
要求B和A一样,
A,B都有多条记录,要能自动查找更新