oracle 空字符串 null 和各类判断当前字段是否为空

状况一: select (case when trim('      ') is not null then 'not null' else 'is null' end) as age from dual; 输出结果:age: 'is null'  状况二:删除trim() select (case when '      ' is not null then 'is null' else 'not null' end) as age from dual; 输出结果:age: 'not  null'  由以上测试能够得出从此的判断条件为: if (trim(nvl(var_name_str,''))='')  then          begin            your operation;          end;  end if; nvl用法:nvl(arg,value)表明若是前面的arg的值为null那么返回的值为后面的value