numeric fields and null

From: Don Park <don+postgresql(at)klickitat(dot)st>
To: pgsql-sql(at)postgresql(dot)org
Subject: numeric fields and null
Date: 2003-05-22 18:40:53
Message-ID: Pine.LNX.4.51.0305221135230.14081@amidala.klickitat.st
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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
--
** irc: irc.freenode.net nick: don-o channels: #wireless, #java
** As we enjoy great advantages from inventions of others, we should be
** glad of an opportunity to serve others by any invention of ours; and
** this we should do freely and generously. --Benjamin Franklin

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Don Park 2003-05-22 20:17:57 numeric fields and null
Previous Message Josh Berkus 2003-05-22 16:12:36 Re: Index Selection Problem