What is the value of l_child_number?DECLARE l_parent_number NUMBER := - ProProfs Discuss
Topics
Products
Follow Us:

What is the value of l_child_number?DECLARE l_parent_number NUMBER := 1;BEGIN DECLARE l_child_number NUMBER := 2; BEGIN l_child_number := l_parent_number + l_child_number; END; DBMS_OUTPUT.PUT_LINE(TO_CHAR(l_child_number));EXCEPTION WHEN OTHERS THEN l_child_number := 0; DBMS_OUTPUT.PUT_LINE(TO_CHAR(l_child_number);END;



A. 1
B. 2
C. 3
D. 0
E. None of the above.

This question is part of

EASY ORACLE PLSQL QUIZ
Asked by Violet, Last updated: Feb 09, 2020

+ Answer
Request

1 Answer

John Smith

John Smith

Answered Sep 08, 2016

0-declare l_parent_number number := 1;begin declare l_child_number number := 2; begin - l_parent_number and l_child_number are in scope l_child_number := l_parent_number + l_child_number; end; - l_child_number is no longer in scope and will - trigger an exception dbms_output.put_line(to_char(l_child_number));exception when others then - exception will fire and display 0 l_child_number := 0; dbms_output.put_line(to_char(l_child_number);end;
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.