From: Ajit Aranha <ajit_aranha@rocketmail.com>
To: pgsql-sql@postgresql.org
Subject: Null not equal to '' (empty)
Date: Thu, 19 Sep 2002 23:09:16 -0700 (PDT)
Message-ID: <20020920060916.42881.qmail@web14104.mail.yahoo.com> (raw)
Why is ''(empty) not equal to null? Its a major headache when porting
from other RDBMS like Oracle. Anyone knows any easy workarounds?
i.e. if you use: create table tbl (
c1 varchar(5));
insert into tbl values ('');
select * from tbl where c1 is null; will return
zero rows.
Also try this: select TO_DATE('','DD-MM-YY'); and
this TO_DATE('','DD-Mon-YY');
;-)
-Ajit (ajit_aranha@rocketmail.com)
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ajit_aranha@rocketmail.com
Subject: Re: Null not equal to '' (empty)
In-Reply-To: <20020920060916.42881.qmail@web14104.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox