Re: numeric fields and null

From: Franco Bruno Borghesi <franco(at)akyasociados(dot)com(dot)ar>
To: Don Park <donp+postgresql(at)klickitat(dot)st>, pgsql-sql(at)postgresql(dot)org
Subject: Re: numeric fields and null
Date: 2003-05-22 22:40:48
Message-ID: 200305221940.49755.franco@akyasociados.com.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

the correct way to do it is
select id,postaladdressid from users where postaladdressid IS null;

I could tell you way, but this explanation (http://techdocs.postgresql.org/guides/BriefGuideToNulls) is
so good that I'would waste your time :)

On Thursday 22 May 2003 17:17, Don Park wrote:
> Im trying to pull out all records in a table where field
> 'postaladdressid=null' but I cant figure this out.
>
> \d users
> ....
> id | numeric
> postaladdressid | numeric
> ....
>
> adhoc=# update users set postaladdressid=null where id=50;
> UPDATE 1
>
> adhoc=# select id,postaladdressid from users where postaladdressid=null;
> id | postaladdressid
> ----+-----------------
> (0 rows)
>
> Why did it not select record 50?
>
> just for your info, this is what record 50 looks like.
> adhoc=# select id,postaladdressid from users where id=50;
> id | postaladdressid
> ----+-----------------
> 50 |
> (1 row)
>
>
> Don

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Don Park 2003-05-22 23:25:13 Re: numeric fields and null
Previous Message Guy Fraser 2003-05-22 22:27:03 Re: numeric fields and null