Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> PL/SQL: handling of empty string (strange)

PL/SQL: handling of empty string (strange)

From: stephan <stephan0h_at_yahoo.de>
Date: 11 Mar 2004 06:47:06 -0800
Message-ID: <af65e20e.0403110647.746a12bc@posting.google.com>


Hi everybody,

I've got this code-sample here which puzzles me:

declare
  s VARCHAR2(1):='S';
begin
  dbms_output.put_line(s);
  if s!='' then
    dbms_output.put_line('hoppla');
  else
    dbms_output.put_line('ballaballa');
  end if;
end;
/   

When run the program enters the else-branch. But why - 'S'!='' must certainly be true!?

Thanks,
Stephan Received on Thu Mar 11 2004 - 08:47:06 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US