Re: How to get only the non-matching entries from an outer join

From: (wrong string) öth <dnoeth_at_gmx.de>
Date: Wed, 27 Nov 2002 11:05:55 +0100
Message-ID: <as25di$n382p$1_at_ID-28204.news.dfncis.de>


Heinz Huber wrote:
>> SELECT T2.FK, T1.PK
>> FROM T2
>> LEFT JOIN T1 ON T2.FK = T1.PK
>> WHERE (T1.PK Is Null);
>
> AFAIK, this will give you all rows from T2 without any data from T1.
> The where clause is applied BEFORE the outer join. Therefore all rows
> from T1 are filtered out since the PK cannot be NULL.

No, the WHERE clause is applied AFTER an Outer Join, that's why the result set is correct.

Dieter Received on Wed Nov 27 2002 - 11:05:55 CET

Original text of this message