Re: How to retrieve rows with empty value in numeric(12,8) columns

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Adarsh Sharma <adarsh(dot)sharma(at)orkash(dot)com>
Cc: 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:07:48
Message-ID: 4EDDF784.9050704@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 06/12/2011 11:00, Adarsh Sharma wrote:
> try
>>
>> select * from table where lat IS NULL;
>>
>> Bèrto
> :-) It works, Thanks a lot Berto !
>
> can you explain how it works or any link that explain the difference
> between 2 queries.

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.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2011-12-06 11:18:46 Re: How to retrieve rows with empty value in numeric(12,8) columns
Previous Message Adarsh Sharma 2011-12-06 11:00:30 Re: How to retrieve rows with empty value in numeric(12,8) columns