oracle认为''就是null。不信你试试。

解决方案 »

  1.   

    where fieldname is null
      

  2.   

    是‘ ’呢,还是NULL呢?NULL 就是‘’吧
      

  3.   

    什么也没有就是null,你输入进去字符串或数字,再删除还是用null表示
    select * from a where name is null
      

  4.   

    那么Oracle中没有 ''这个吗? 只有Null?MSsql2000中就有''也有null的啊??
      

  5.   

    在oracle里
    ''就是 NULL
    NULL 就是 ''判断
    select name from table where name is NULL;
    select name from table where name is NOT NULL;
      

  6.   

    ORACLE
    里面 '' 和 NULL是一回事
    在MySQL和SQL Server(也就是MSSQL)里面, ''和NULL不一样的
      

  7.   

    用insert into tablename(fieldname1) values('')
    再用select * from tablename where fieldname1 = ''这样是查不出刚刚插进去的数据的,
    要用select * from tablename where fieldname1 is null
    ^_^
      

  8.   

    null 和 '' 是不一样的,也许高版本的ORACLE认为是一样的吧
      

  9.   

    null 和 '' 不一样,除非是字符型
      

  10.   

    SQL> select nvl('',0) from dual;N
    -
    0SQL> select nvl(NULL,0) from dual;NVL(NULL,0)
    -----------
              0
    有什么区别吗?
      

  11.   

    一直认为NULL和''是不一样的,最好是
    where ...and  (c1='' or c1 is null) and ......
      

  12.   

    if fieldname='' then ..和if fieldname=' ' then ..不一样,后者表示是个空格,前者表示是空;
      

  13.   

    在oracle中. null 不等于 null的.null也不等于''select * from table_test where 字段=null    将得不到任何数据.,
    select * from table_test where 字段 is null   <---正确.select * from table_test where 字段=''   <--也得不到正确的结果 
      

  14.   

    select * from table_test where 字段=''   
    这样不行的,得不到正确结果还是要使用is null
      

  15.   

    to dinya2003(OK)
    如你所说
    那我现在要求往表里插入值为 ''的记录,并且把值为 ''的记录select出来。。  '' 就是 NULL
    但是不能这样查  where field='' 要写成 is null 的形式。。“select * from table_test where 字段=null    将得不到任何数据.,”
    =================================
    这是概念问题了,对于NULL值,oracle语法规定必须是 IS NULL来判断,而不是=NULL
    写成=NULL当然不对了
      

  16.   

    如果字段為char或varchar的時候﹐'  '和''﹑null是不同的