PLSQL中空字符串的判断

来源:互联网 发布:高通骁龙835超频软件 编辑:程序博客网 时间:2024/05/01 09:50
 
-- Created on 2012-01-04 by KANLIANHUI declare   -- Local variables here  i varchar2(16);begin  -- Test statements here  i:='';  dbms_output.put_line('i的值是:'|| i ||'.');  if(i='') then        dbms_output.put_line('i 是空字符串');  end if;   if(i is not null) then        dbms_output.put_line('i不为null');         end if;     if(i is  null) then        dbms_output.put_line('i为null');  end if;end;


输出的结果:

i的值是:.
i为null