select Field1 from A where Field1 not in (select Field1 from B union select Field1 from C)
有问题? with ADOQuery1 do begin Close; SQL.Clear; sql.Add('select 机号 from klib where 机号 not in (select 机号 from jf union select 机号 from pc)'); open; First; while not Eof do begin ListBox1.Items.Add(FieldValues['机号']); Next; end; Close; end;
出现“字查询中不允许此操作” 数据库是Access
select F1 from A where F1 not in (select f1 from b) and F1 not in (select f1 from c)
with ADOQuery1 do
begin
Close;
SQL.Clear;
sql.Add('select 机号 from klib where 机号 not in (select 机号 from jf union select 机号 from pc)');
open;
First;
while not Eof do
begin
ListBox1.Items.Add(FieldValues['机号']);
Next;
end;
Close;
end;
数据库是Access