> I've a problem when selecting values out a table.
It's correct. NULL<>1 is defined as NULL by the spec.
Where clauses only return rows that the expression is true
and so will not return the NULL row.
If you want the null rows to show up, you'll need to either
use coalesce or add or blah IS N
On Tue, 12 Jun 2001, Peter Pilsl wrote:
> I've a problem when selecting values out a table.
>
> manana=# select * from test;
> l1 | l2 | l3
> ++
> 1 | 2 | 3
> 2 | 3 | 4
> 3 | 4 | 5
> 4 | 5 | 6
> | 5 | 6
> (5 rows)
>
> where l1 is NULL in the last line.
> now I do
>
I've a problem when selecting values out a table.
manana=# select * from test;
l1 | l2 | l3
++
1 | 2 | 3
2 | 3 | 4
3 | 4 | 5
4 | 5 | 6
| 5 | 6
(5 rows)
where l1 is NULL in the last line.
now I do
manana=# select * from test where l1<>1;
l1 | l2 | l3
++