Обсуждение: about NULL

Поиск
Список
Период
Сортировка

about NULL

От
zhangyue
Дата:
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

От
"Christopher Kings-Lynne"
Дата:
> 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