SQL>
SQL> set serveroutput on
SQL> set echo on
SQL> DECLARE
2 v_A Number := 50;
3 v_B Number;
4 BEGIN
5 IF v_A > 40 THEN
6 v_B := v_A - 40;
7 DBMS_OUTPUT.PUT_LINE('V_B = ' || v_B);
8 ELSE
9 v_B := 0;
10 END IF;
11 END;
12 /
V_B = 10
PL/SQL procedure successfully completed.