---------------------------关于NULL 与 ''  -------------------DB2------------

db2 => create table b(i integer,j char(10));
create table b(i integer,j char(10))
DB20000I  The SQL command completed successfully.

db2 => insert into b values (1,'111');
insert into b values (1,'111')
DB20000I  The SQL command completed successfully.

db2 => insert into b values (2,'');
insert into b values (2,'')
DB20000I  The SQL command completed successfully.

db2 => insert into b(i) values (3);
insert into b(i) values (3)
DB20000I  The SQL command completed successfully.

db2 => commit;
commit
DB20000I  The SQL command completed successfully.

db2 => select * from b;
select * from b

I           J        
----------- ----------
          1 111      
          2          
          3 -        

  3 record(s) selected.


db2 => select * from b where j is null;
select * from b where j is null

I           J        
----------- ----------
          3 -        

  1 record(s) selected.


db2 => select * from b where j='';
select * from b where j=''

I           J        
----------- ----------
          2          

  1 record(s) selected.


---------------------------关于NULL 与 ''  ------------------ORACLE------------
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create table b(i integer,j char(10));

Table created.

SQL>  insert into b values (1,'111');

1 row created.

SQL> insert into b values (2,'');

1 row created.

SQL> insert into b(i) values (3);

1 row created.

SQL> commit;

Commit complete.

SQL>  select * from b;

         I J
---------- ----------
         1 111
         2
         3

SQL> select * from b where j is null;

         I J
---------- ----------
         2
         3

SQL> select * from b where j='';

no rows selected

SQL>