Re: about NULL

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "zhangyue" <postgresql(at)db(dot)pku(dot)edu(dot)cn>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: about NULL
Date: 2003-05-21 08:49:10
Message-ID: 0c9601c31f75$d9b61790$6500a8c0@fhp.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nigel J. Andrews 2003-05-21 08:58:22 Re: SELECT DISTINCT ON bug?
Previous Message Shridhar Daithankar 2003-05-21 08:46:47 Re: [HACKERS] about NULL

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2003-05-21 10:46:57 Re: Please, apply patch for current CVS
Previous Message Shridhar Daithankar 2003-05-21 08:46:47 Re: [HACKERS] about NULL