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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-general by date

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