退一步用sql 重新得到数据集select * from table1 where id not in (select id from table2)
谢谢回答!是这样的,两个结果集来源于不同的地方,可能是两个数据库,甚至是两台计算机,所以不能用连接两个表查询的方法。我想了一下用下面的方法: while not q1.eof do begin locateresult:=q2.locate(...); if locateresult then ... else ...; q1.next; end; 但这样的话,如果q2中记录很多,执行完整个循环会很慢,因为locate花的时间比较长。有没有更快的查询定位方法呢?
while not q1.eof do
begin
locateresult:=q2.locate(...);
if locateresult then
...
else
...;
q1.next;
end;
但这样的话,如果q2中记录很多,执行完整个循环会很慢,因为locate花的时间比较长。有没有更快的查询定位方法呢?
库中后,再用pazee(耙子) 的方法