QuestionQ30

VerifiedPL/SQL Language Fundamentals

Which two code blocks display the numeric value zero?

Choose two
Explanation

PL/SQL identifiers declared in an enclosing unit are available to its subunits. If a subunit redeclares an identifier, the local declaration hides the enclosing one unless the enclosing identifier is qualified with its declaring unit's name. Thus, the initialized procedure variable in A is accessed as calc_price.price, and B's procedure uses the enclosing initialized variable. In C and D, the value sent to DBMS_OUTPUT is NULL rather than zero.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!