Friday, 16 May 2014

Using IF ELSE Condition in plsql

 DECLARE
x number(2) := 10;

BEGIN

IF (x between 5 and 20) THEN
 dbms_output.put_line('True');
  ELSE
  dbms_output.put_line('False');
END IF;
 
 IF (x BETWEEN 5 AND 10) THEN
    dbms_output.put_line('True');
 ELSE
 dbms_output.put_line('False');
 END IF;

 IF (x BETWEEN 11 AND 20) 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.