Friday, 16 May 2014

Using if else condition in plsql 2

DECLARE
letter varchar2(1) := 'm';
BEGIN

    IF (letter in ('a', 'b', 'c')) THEN
    dbms_output.put_line('True');
    ELSE
    dbms_output.put_line('False');
    END IF;
 
    IF (letter in ('m', 'n', 'o')) THEN
    dbms_output.put_line('True');
    ELSE
    dbms_output.put_line('False');
    END IF;
   
    IF (letter is null) THEN
    dbms_output.put_line('True');
    ELSE
    dbms_output.put_line('False');
    END IF;
END;
/

No comments:

Post a Comment

Note: only a member of this blog may post a comment.