b varchar2(10)where b = '' or b is null 和 where b is null 应该是一样的, 前面那个加上了 b = '' 我觉得一点用处没有。各位大虾,请指教,谢谢
(当然b='' 和 b is null这两个的区别我是知道的。)

解决方案 »

  1.   


    SQL> create table t2(idx int,cname nvarchar2(20));Table createdSQL> insert into t2 select 1,'' from dual;1 row insertedSQL> select * from t2 where cname is null;                                    IDX CNAME
    --------------------------------------- ----------------------------------------
                                          1 SQL> select * from t2 where cname='';                                    IDX CNAME
    --------------------------------------- ----------------------------------------
      

  2.   

    在SQL Server里面 '' 和 null 不是一样的不过在ORACLE 里面 '' 和 null 是一样的