Code: Select all
SELECT * FROM MyTable
WHERE MyID NOT IN (SELECT ID FROM MyOtherTable)
Code: Select all
var q = from t1 in MyTable
let t2s = from t2 in MyOtherTable
select t2.ID
where !t2s.Contains(t1.MyID)
select t1;
I've tried to split it in 2 different queries:
Code: Select all
var mySet = from t2 in MyOtherTable select t2.ID;
var q = from t1 in MyTable
where !mySet.Contains(t1.MyID)
select t1;
The same thing happen with both .Contains() and .Any()
Is there any way to get "not in" subquery in LinqToOracle?