Which statement is true about the execution of the code if the query in the PL/SQL block returns no rows?

Examine the following PL/SQL code:

Which statement is true about the execution of the code if the query in the PL/SQL block returns no rows?

Examine the following PL/SQL code:

Which statement is true about the execution of the code if the query in the PL/SQL block returns no rows?

A.
The program abruptly terminates and an exception is raised.

B.
The program executes successfully and the output is No ROWS_FOUND.

C.
The program executes successfully and the query fetches a null value in the V_LNAME
variable.

D.
Program executes successfully, fetches a NULL value in the V_LNAME variable and an
exception is raised.

Explanation:



Leave a Reply 5

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


vishesh bansal

vishesh bansal

ans is A

below error is encountered;

ORA-01403: no data found
ORA-06512: at line 4
01403. 00000 – “no data found”

samkelo siyabonga ngubo

samkelo siyabonga ngubo

A

Piero

Piero

A
but for too rows ORA-01422

SELeCT LAST_NAME FROM EMPLOYEES WHERE FIRST_NAME = ‘John’;

LAST_NAME
Chen
Russell
Seo

declare
v_lname varchar2(15);
begin

SELeCT LAST_NAME into v_lname FROM EMPLOYEES WHERE FIRST_NAME = ‘John’;
if v_lname is null then
dbms_output.put_line(‘n u l l ‘);
else
dbms_output.put_line(v_lname);
end if;
end;

ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at line 5

larissa

larissa

A. Error ORA-01403