Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The following code does not violate any constraints and will not raise an ORA - 0 2 2 9 2 error. What will happen when
The following code does not violate any constraints and will not raise an ORA error. What will happen when the code is executed?
BEGIN
DECLARE
econstraintviolation EXCEPTION;
PRAGMA EXCEPTIONINITeconstraintviolation, ;
BEGIN
DBMSOUTPUT.PUTLINEInner block message;
END;
EXCEPTION
WHEN econstraintviolation THEN
DBMSOUTPUT.PUTLINEOuter block message;
END;
Inner block message will be displayed.
The code will fail because the exception is declared in the inner block but is referenced in the outer block.
Outer block message will be displayed.
The code will fail because line should read: PRAGMA EXCEPTIONINIT econstraintviolation;
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