用SQL首先,要在两个表中设置键值: Exp Table1 (id int Key, fa char(8), fb char(8))Table2 (id int Key, fa char(8), fb char(8)) select a.*,b.fa,b.fb from table1 a inner joinj table2 b on a.id=b.id where a.fa<>b.fa or a.fb<>b.fb
用id进行对等联接后,只要有一张表的数据发生改动 a.fa<>b.fa or a.fb<>b.fb 就会有效。 祝你好运
Exp
Table1
(id int Key,
fa char(8),
fb char(8))Table2
(id int Key,
fa char(8),
fb char(8))
select a.*,b.fa,b.fb
from table1 a inner joinj table2 b
on a.id=b.id
where a.fa<>b.fa or a.fb<>b.fb
a.fa<>b.fa or a.fb<>b.fb
就会有效。
祝你好运