QuestionQ20

VerifiedPL/SQL Language Fundamentals

Examine this DECLARE section:

Question Image

Which line will produce an error upon execution?

Explanation

A VARCHAR2 PL/SQL variable must specify its maximum size. The declaration v_char VARCHAR2 := NULL; omits that required length constraint, so it is invalid. A NOT NULL variable may be initialized with DEFAULT TRUE, and SUBSTR(..., 0) returns a null value that is valid for a nullable VARCHAR2(80) variable.

Learn more

Community Discussion

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