使用locate语句。如果没有索引也没有主键,那只能进行全部字段比较(参看locate的帮助文件);如果有主键,可以只比较作为主键的字段。例程:
a.first;
while not a.eof do
begin
  if b.locate() then
  {处理}
  else
  {处理}   a.next;
end;