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

Re: no value fetch

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: BRINER Cedric <work(at)infomaniak(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: no value fetch
Date: 2004-07-28 03:48:27
Message-ID: 20040727204709.E28969@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-general
On Tue, 27 Jul 2004, BRINER Cedric wrote:

> hi,
>
> Imagine that I have the following table where ts_sent is a timestamp(0)
>
> select * from notification;
>       to_used        | ts_sent                 |   from
> ---------------------+-------------------------+---------
>  amanda(at)obs(dot)unige(dot)ch |  2004-07-21 14:19:43+02 | amanda
>  amanda(at)obs(dot)unige(dot)ch |                         | postgres
>
> and so, how do I do to fetch the second line by asking :
> catch me the line where ts_sent doesn't have a value !
>
> I've try:
> select * from notification where ts_sent = null ;

Use ts_sent IS NULL, not ts_sent = null.

Pretty much, <anything> = null returns null.


In response to

Responses

pgsql-general by date

Next:From: Robby RussellDate: 2004-07-28 04:20:02
Subject: Re: Trigger on Postgres for tables syncronization
Previous:From: Marc G. FournierDate: 2004-07-28 02:30:24
Subject: Re: NNTP server

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