Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B9BEB475BD7 for ; Fri, 20 Sep 2002 02:09:16 -0400 (EDT) Received: from web14104.mail.yahoo.com (web14104.mail.yahoo.com [216.136.172.134]) by postgresql.org (Postfix) with SMTP id 34E0847595A for ; Fri, 20 Sep 2002 02:09:16 -0400 (EDT) Message-ID: <20020920060916.42881.qmail@web14104.mail.yahoo.com> Received: from [164.164.86.66] by web14104.mail.yahoo.com via HTTP; Thu, 19 Sep 2002 23:09:16 PDT Date: Thu, 19 Sep 2002 23:09:16 -0700 (PDT) From: Ajit Aranha Subject: Null not equal to '' (empty) To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/354 X-Sequence-Number: 9631 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