Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

BOOLEAN Datatype

EV259May 14 2013 — edited May 15 2013
Hi All,

Going thorugh one of the blogs, i came across the below ananymous block. I am not able to understand, how the output will be as 'ELSE PART', as we are not comparing X with any of the values. Could you please explain how it will be.
SQL> DECLARE
  2    x BOOLEAN;
  3  BEGIN
  4    IF X THEN
  5      dbms_output.put_line('IF PART');
  6    ELSE
  7      dbms_output.put_line('ELSE PART');
  8    END IF;
  9  END;
 10  /
ELSE PART

PL/SQL procedure successfully completed.

SQL>
Thanks All in advance,

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2013
Added on May 14 2013
15 comments
436 views