Re: What's the difference between NULL and ""
Posted in 1999
Topics: General Discussion
> Am I mistaken? I always assumed that a quoted string with no literal (ie. > "") was interpreted the same as a NULL. Do I have some onscure 'feature' > set? NULL and "" are treated differently. NULL is documented as undefined/unknown, which is not the same as an empty string.
Chuck Renaud wrote: > > > Am I mistaken? I always assumed that a quoted string with no > > literal (ie. "") was interpreted the same as a NULL. Do I have > > some onscure 'feature' set? > > NULL and "" are treated differently. NULL is documented as > undefined/unknown, which is not the same as an empty string. But beware: I4GL treats "" as NULL in string assignments in pure I4GL code, even though in the SQL statements, it will be interpreted as a non-null string by the database server! -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>