On 2004-12-02, Tom Lane <[EMAIL PROTECTED]> wrote:
> "Kevin B." <[EMAIL PROTECTED]> writes:
>> Select a.i, b.i
>> from t as a
>> left join t as b on a.i = b.i
>> where a.n = 'a' and b.n = 'b' and b.i is null
>
> This can't succeed since the b.n = 'b' condition is guaranteed to fail
> when b.* is nu
"Kevin B." <[EMAIL PROTECTED]> writes:
> Select a.i, b.i
> from t as a
> left join t as b on a.i = b.i
> where a.n = 'a' and b.n = 'b' and b.i is null
This can't succeed since the b.n = 'b' condition is guaranteed to fail
when b.* is nulled out ...
regards, tom lane
-
I would like to find the "missing" rows between two sets without using a
subselect (or views).
This query finds the rows that are in t1 but not in t2. (see the script
below for table definitions.)
QUERY 1:
select * from t1 left join t2 on t1.i = t2.i where t2.i is null
The above query i