Question: DATABASE PROGRAMMING - Debug The following given codes will not pass the compilation, please debug. You need to correct the syntax errors and make the

DATABASE PROGRAMMING - Debug

The following given codes will not pass the compilation, please debug. You need to correct the syntax errors and make the program runnable. Make sure your result code will pass the compilation, get some output

DECLARE

Maxno number := 7;

counter number := 2;

Exceed_Limit Exception;

Begin

LOOP

DBMS_OUTPUT.PUT_LINE('counter is: ' ||counter || '.');

counter := counter + 2;

If counter > Maxno THEN

RAISE Exceed_Limit;

END loop;

EXCEPTION

WHEN Exceed_Limit THEN

DBMS_OUTPUT.PUT_LINE

('Error, the counter now exceeds the limit of ' ||Maxno || '.');

WHEN OTHERS THEN

DBMS_OUTPUT.PUT_LINE('Trapped by OTHERS.');

END;

/

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!