This is because '' is not equal to NULL '' Means a empty string NULL means a empty set
So this: SELECT * FROM tbl WHERE c1 IS NULL; is totally different then: SELECT * FROM tbl WHERE c1=''; Ries -----Oorspronkelijk bericht----- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Namens Ajit Aranha Verzonden: vrijdag 20 september 2002 8:09 Aan: [EMAIL PROTECTED] Onderwerp: [SQL] Null not equal to '' (empty) 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 ([EMAIL PROTECTED]) __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]