QuestionQ26

VerifiedPL/SQL Language Fundamentals

Sequence S and table PRODUCTS exist in your schema.

Review the table description:

Question Image

Next, review this code block:

Question Image

Which two lines each cause a compilation error?

Choose two
Explanation

A stored procedure's formal parameter list must consist of a plain identifier followed by an optional parameter mode and a datatype; wrapping the parameter name in a function call such as UPPER(pdt_name_in) is invalid syntax and the compiler rejects it at the line containing the procedure header. Independently, DECODE is a construct that PL/SQL only permits to be evaluated inside a SQL statement; invoking it directly in a standalone PL/SQL assignment, as in compare_value := DECODE(...), raises PLS-00204 ('function or pseudo-column may be used inside a SQL statement only'), so that assignment line also fails to compile.

Community Discussion

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