View Exhibit1 and examine the structure of the employees table.
View Exhibit2 and examine the code.
What is the outcome when the code is executed?
A.
Both blocks compile and execute successfully when called.
B.
Both blocks compile successfully but the CALC_SAL procedure gives an error on execution.
C.
The CALC_SAL procedure gives an error on compilation because the amt variable should be
declared in the RAISE_SALARY procedure.
D.
The CALC_SAL procedure gives an error on compilation because the RAISE_SALARY
procedure cannot call the stand-alone increase function.
A
A
a
A
Answer: A
CREATE OR REPLACE Procedure U1
( name IN varchar2 )
IS
cnumber number;
PROCEDURE U2 IS
Begin
SELECT 1 from dual;
END U2;
BEGIN
NUll;
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20001,’An error was encountered – ‘||SQLCODE||’ -ERROR- ‘||SQLERRM);
END;
C is wrong.
==================================
CREATE OR REPLACE Procedure op1
( name_in IN varchar2 )
IS
a varchar2;
procedure op1a(b number) is
begin
a := to_char(b);
End op1a;
Begin
op1a(100);
End op1;
A