Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: <> '' in PL/SQL
If '' is the same as NULL then can I use:
" is not '' " instead of " is not null " ?
Michel Cadot <micadot_at_netcourrier.com> wrote:
: You have to change <> '' to is not null. : As a matter of fact, '' is the same as NULL in PL/SQL : so <> '' cannot be true and else part is execute. : v734>l : 1 declare : 2 abc varchar2(1); : 3 begin : 4 abc := 'a'; : 5 if abc is not null then : 6 dbms_output.put_line(abc||' <> empty'); : 7 else : 8 dbms_output.put_line(abc||' = empty'); : 9 end if; : 10* end;
: PL/SQL procedure successfully completed.
: Norris a écrit dans le message <7rl8s6$4qs$1_at_adenine.netfront.net>...
--
--
http://www.washington.edu/pine/faq/
Received on Tue Sep 14 1999 - 08:11:29 CDT