[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-sql
Subject: Re: [SQL] numeric fields and null
From: Guy Fraser <guy () incentre ! net>
Date: 2003-05-22 22:27:03
[Download RAW message or body]
Use:
SELECT id,postaladdressid FROM users WHERE postaladdressid IS NULL;
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
>
>
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic