stress_test C on C.id=A.id and B.[k]=C.[key] where C.id is null) GO PRINT ''''第四种语句:'''' select distinct a.id from stress_test a where not exists ( select * from keytb c where not exists ( select * from stress_test b where b.id = a.id and c.kf1 = b.[key] ) ) GO PRINT ''''第五种语句:'''' SELECT distinct a.[id] FROM stress_test AS a,stress_test AS b,stress_test AS c,stress_test AS d,stress_test AS e,stress_test AS f WHERE a.[key]=''''Az'''' AND b.[key]=''''Bw'''' AND c.[key]=''''Cv'''' AND d.[key]=''''Du'''' AND e.[key]=''''Ex'''' AND f.[key]=''''Fy'''' and a.[id] = b.[id] and a.[id] = c.[id] and a.[id] = d.[id] and a.[id] = e.[id] and a.[id] = f.[id]