"psql novice" <psql_novice@operamail.com> writes:
> stock=> select * from stock where qty = NULL;
The correct incantation is
select * from stock where qty IS NULL;
Ordinary comparisons involving NULL always fail (or more accurately,
return NULL). You have to use the special "is null" operator instead.
regards, tom lane