2
我使用Microsoft SQL Server和我查询的格式如下(表1主键(A,B))的:SQL查询 - 过滤主键
Select table1.A, table1.B, table2.C, Table3.D
from table1
left outer join table2 on table1.A = table2.A
left outer join tabl3 on table1.B = table3.B
//Here comes the question
//Except (A,B) in (select A,B from BadTable)
我怎么能做到这一点很好?我在想找到一套使用某物像正确的键的(不能使用除外 - 运行SQL Server 2000)
Select A,B
from table1
not exists (select A,B from bad table)
,然后内部联接与主查询。你怎么看?