Which statement is true about the execution of the PL/SQL code?

Examine the following PL/SQL code:

Which statement is true about the execution of the PL/SQL code?

Examine the following PL/SQL code:

Which statement is true about the execution of the PL/SQL code?

A.
It executes successfully.

B.
It generates a run-time exception.

C.
It does not execute because of syntax error

D.
It executes successfully and generates a warning.

Explanation:
http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/errors.htm



Leave a Reply 13

Your email address will not be published. Required fields are marked *


Rose

Rose

answer is B

ORA-06512: na linha 8
01476. 00000 – “divisor is equal to zero”

Fabio

Fabio

the right one is B

create or replace procedure proctest as
stock_price NUMBER := 9.73;
net_earnings NUMBER := 0;
pe_ratio NUMBER;
BEGIN
pe_ratio := stock_price / net_earnings;
DBMS_OUTPUT.PUT_LINE(‘Price/earnings ratio = ‘ || pe_ratio);
END;

Procedure created.

No compilation errors. Only when you call it you got exception for zero divisor.

Khizar

Khizar

Correct Ans: B

Alisa

Alisa

declare
a number;
b number :=0;
c number;
begin
a := 500;
c := a/b;
end;
/
Error report –
ORA-01476: divisor is equal to zero
ORA-06512: at line 7
01476. 00000 – “divisor is equal to zero”

Leo Yu

Leo Yu

B) divisor is equal to zero