-- Created on 2012/11/20 by JWW declare -- Local variables here i integer := 2; j integer := 2; k varchar2(60); op varchar2(45); begin -- Test statements here k := ''; if (i = j and k = '') then --能不能输出 op := 'k = ""有结果'; else op := 'k is null有结果'; end if; end;
k 无论赋值还是不赋值,赋'' 或null ,都是 k is null 才生效,= ,!=无效