After this Lab, you will be able to:
The following example will help to illustrate some of the differences between compilation and runtime errors.
▪ FOR EXAMPLE
DECLARE v_num1 INTEGER := &sv_num1; v_num2 INTEGER := &sv_num2; v_result NUMBER; BEGIN v_result = v_num1 / v_num2; DBMS_OUTPUT.PUT_LINE ('v_result: '||v_result); END;
This example is a very simple program. There are two variables, v_num1 and v_num2. A user supplies values for these variables. Next, v_num1 is divided by v_num2, and the result of this division is stored in the third variable, v_result. Finally, the value of v_result is displayed on the screen.
Now, assume that a user supplies values ...