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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started