Re: testing for null value in integer field?

From: Wei Weng <wweng(at)kencast(dot)com>
To: Geoffrey <esoteric(at)3times25(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: testing for null value in integer field?
Date: 2003-12-19 16:12:24
Message-ID: 3FE32368.30303@kencast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Geoffrey wrote:

> How does one check for an unset value in an integer field?
>
> I've tried such things as:
>
> select ..... where intnumber = ''
> select ...... where intnumber = ?
> select ..... where intnumber = NULL
>
> Thanks.
>
It is actually WHERE intnumber IS NULL. You don't use operator = to
compare with NULLs, you use IS.

HTH.

Wei

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Guy Fraser 2003-12-19 16:16:34 Re: testing for null value in integer field?
Previous Message CoL 2003-12-19 16:08:36 Re: testing for null value in integer field?