Thread: about NULL

about NULL

From
zhangyue
Date:
Hi,
How can I get the tuples one of whose attributes is NULL?
For example, First, create table tb(id int,name text); Then   insert into tb values(1); 
insert into tb values(2,'Rose'); I want to select the tuples whose attribute name= NULL,
How to write the sql ?
Thanks.


Re: about NULL

From
"Christopher Kings-Lynne"
Date:
> How can I get the tuples one of whose attributes is NULL?
> For example,
>   First, create table tb(id int,name text);
>   Then   insert into tb values(1); 
> insert into tb values(2,'Rose');
>   I want to select the tuples whose attribute name= NULL,
> How to write the sql ?

SELECT * FROM tb WHERE name IS NULL;

Chris