plsql IF-THEN-ELSIF-ELSE


Example

DECLARE
v_num1 NUMBER(10);
v_num2 NUMBER(10);

BEGIN
  v_num1 := 2;
  v_num2 := 2;
  
  IF v_num1 > v_num2 THEN
     dbms_output.put_line('v_num1 is bigger than v_num2');
  ELSIF v_num1 < v_num2 THEN
    dbms_output.put_line('v_num1 is NOT bigger than v_num2');
  ELSE
    dbms_output.put_line('v_num1 is EQUAL to v_num2');
  END IF;
END;