Skip site navigation (1) Skip section navigation (2)

Re: problems with left outer join

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andreas Andreakis" <andreas(dot)andreakis(at)googlemail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: problems with left outer join
Date: 2006-10-05 13:35:07
Message-ID: 12359.1160055307@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
"Andreas Andreakis" <andreas(dot)andreakis(at)googlemail(dot)com> writes:
> So I tried:

> select *
> from A t1 left outer join B t2 on t1.id = t2.id
> where t2.id = null

You need "IS NULL", not "= NULL".  See
http://www.postgresql.org/docs/8.1/static/functions-comparison.html

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Ray StellDate: 2006-10-05 13:38:42
Subject: Re: pg_ctl -D?
Previous:From: Andy ChambersDate: 2006-10-05 13:27:06
Subject: Re: problems with left outer join

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group