QuestionQ6

VerifiedPL/SQL Language Fundamentals

SERVEROUTPUT is enabled.

Which method correctly uses a packaged constant in SELECT statements?

Explanation

A packaged PL/SQL constant cannot be used directly as a SQL expression. A function declared in a package specification can be invoked from a SELECT statement; exposing a function that returns the packaged constant makes its value available to SQL. The function in the package body returns 30, so the predicate selects 35 and excludes 12.

Learn more

Community Discussion

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