Re: where with NULL values are not selected

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Cc: Düster Horst <Horst(dot)Duester(at)bd(dot)so(dot)ch>
Subject: Re: where with NULL values are not selected
Date: 2005-07-08 09:54:46
Message-ID: 200507081154.46530.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Am Freitag, 8. Juli 2005 12:08 schrieb Düster Horst:
> table1.column and table2.column may have NULL values. The problem is that
> these columns where not selected. Does there exists any solution to
> select/join the NULL value colums also.

Read up on outer joins. In your case, try this:

select table1.column from table1 full outer join table2 on
(table1.column=table2.column);

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Dawid Kuroczko 2005-07-08 10:08:25 Re: where with NULL values are not selected
Previous Message Mogin Mohandas 2005-07-08 08:18:14 doubt