From: | Bèrto ëd Sèra <berto(dot)d(dot)sera(at)gmail(dot)com> |
---|---|
To: | rod(at)iol(dot)ie |
Cc: | Adarsh Sharma <adarsh(dot)sharma(at)orkash(dot)com>, pgsql-general General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to retrieve rows with empty value in numeric(12,8) columns |
Date: | 2011-12-06 11:20:01 |
Message-ID: | CAKwGa__G66BeVMNPF_yoALvADQ_bV9TaP6FmR2HW7HBzXVPPrw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
> As I understand it, your first query returned nothing because NULL is
> simply "unknown" - and since you can never know what it's equal to,
> looking for equality with NULL will never find anything.
>
Yes, you can basically think of NULLs in SQL as having the same role of
zeros in division. They make no sense in principle and must be treated
apart. I seem to recall Oracle treating empty strings as NULLs, but this is
very dangerous. A NULL means nothing has been assigned, i.e. data is not
stated in any way, while an empty string IS an assignment. There is a
difference between "nothing" and "this" (no matter what "this" is).
Bèrto
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Migowski | 2011-12-06 14:41:12 | Re: BUG #6325: Useless Index updates |
Previous Message | Alban Hertroys | 2011-12-06 11:18:46 | Re: How to retrieve rows with empty value in numeric(12,8) columns |