Hi,
How would you retrieve records containing NULL values?
Lets say you have a table called stock:
stock=> \d stock
Table "public.stock"
Column | Type | Modifiers
----------+-----------------------+-------------------------------------------------------------
stock_id | integer | not null default nextval('public.stock_stock_id_seq'::text)
name | character varying(20) | not null
qty | integer |
it contains the following records:
stock=> select * from stock;
stock_id | name | qty
----------+-----------+-----
1 | Chair | 10
2 | Desk | 10
3 | Phone | 10
4 | Chalk |
5 | Projector |
(5 rows)
So what i want to do is retrieve 'Chalk' and 'Projector';
Ive tried this but it didnt work.
stock=> select * from stock where qty = NULL;
stock_id | name | qty
----------+------+-----
(0 rows)
Any help would be appreciated.
Thanks in advance
--
____________________________________________
http://www.operamail.com
Get OperaMail Premium today - USD 29.99/year
Powered by Outblaze