Personally I like the Oracle behavior.

Man, I hate it.  See code at the end of this email.

Why is it that you can't get "out" what you put "in"? 'is null' doesn't make a lot of sense to me to begin with (please, just accept test=NULL!) but the fact that oracle turns my '' into a null means that I can't get my results back without turning any queries that have "test = ''" into "test is null"

Postgres still makes me use "is null" to get null values out but if I never explicitly put nulls in, it's not a problem - note in the trascript at the end that I get count(*) = 1 for test='' and for test is null instead of 0 and 2.



ORACLE
--------------------------

SQL> drop table mytable;
Table dropped.

SQL> create table mytable (test varchar(50));
Table created.

SQL> insert into mytable (test) values ('');
1 row created.

SQL> insert into mytable (test) values (NULL);
1 row created.

SQL> select count(*) from mytable where test='';
  COUNT(*)
----------
         0

SQL> select count(*) from mytable where test=NULL;
  COUNT(*)
----------
         0

SQL> select count(*) from mytable where test is NULL;
COUNT(*)
----------
         2

POSTGRES
--------------------------
SQL> drop table mytable;
Table dropped.

SQL> create table mytable (test varchar(50));
Table created.

SQL> insert into mytable (test) values ('');
1 row created.

SQL> insert into mytable (test) values (NULL);
1 row created.

SQL> select count(*) from mytable where test='';
  COUNT(*)
----------
         1

SQL> select count(*) from mytable where test=NULL;
  COUNT(*)
----------
         0

SQL> select count(*) from mytable where test is NULL;
COUNT(*)
----------
         1


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to