假如两个表不同的字段为数值型字段(假设字段为mm):可以这样做:
select a.*,b.*,a.mm-b.mm as result;
from a,b;
havi result<>0;
into curs tmpTable
假如两个表不同的字段不是数值型字段(假设字段为mm):可以这样做:
select a.* from a where a.mm not in(sele dist b.mm from b);
union;
select b.* from b where b.mm not in(sele dist a.mm from a);
into curs tmpTable
没有专门的命令
如果表结构是完全一样的话。
select table2
index on name to tag name
set order to tag name
select table1
fieldcount=afileds(arr)
scan all
go recno() in table2
for i=1 to fieldcount
g='table2.'+arr[i,1]
if &arr[i,1]==&g
*相等
else
*不等
endif
endfor
endscan