When I write an exist query in ORACLE JOIN syntax like this, it works fine as expected.
Select * from TableA
where not exists (Select 1 from TableB where TableB.Id = TableA.TableBForeignKeyId)
When i write it as ANSI JOIN syntax, it doesn't work.
Select * from TableA
where not exists (Select 1
from (TableA
INNER JOIN TableB
on TableA.TableBForeignKeyId = TableB.Id))
On the ANSI JOIN version, TableA behave not like the upper querys TableA, because of that, the complete query returns no rows.
Not: There is only one row on TableA that has no reference on TableB. This query should return one row of TableA.
Why ANSI JOIN behave like this?