oracle中空值是null,而不是‘’

解决方案 »

  1.   

    基本上null与''在oracle是一样效果
      

  2.   

    null怎么会和``一样的效果呢?
    难道:select * from a where state = ``;
      和  select * from a where state is null;
    是一样吗?(state 只有值`1`,`0`)
      

  3.   

    在ORACLE中不能用一个值与null对比,没这样表达
    if null='' then 
    dbms_output_put_line('same');
    end if;只能说if a is null then 
           ....
          end if;
      

  4.   

    我不是太明白你说的:基本上null与''在oracle是一样效果
    你能详细说在什么环境下吗?
      

  5.   

    只是在ORACLE表达意思相同,操作上当然有分别。