PL/SQL Comparaison Between 2 Varchar When One Is NULL
Join the DZone community and get the full member experience.Join For Free
This is a PL/SQL piece of code on Oracle 9i. The <> operator does not work as desired with strings.
declare text1 varchar2(100); text2 varchar2(100); begin text1 := 'toto'; text2 := NULL; if text1 <> text2 then dbms_output.put_line('true'); else dbms_output.put_line('false'); end if; end;Result:
Opinions expressed by DZone contributors are their own.