Examine the following partial declare section from a block of PL/SQL code
Which line(s) in the above code are NOT valid? (Choose all that apply.)
A.
line 2
B.
line 3
C.
line 4
D.
line 5
Examine the following partial declare section from a block of PL/SQL code
Which line(s) in the above code are NOT valid? (Choose all that apply.)
A.
line 2
B.
line 3
C.
line 4
D.
line 5
B D
B D
B,D
BD
Line 3: A variable declared NOT NULL must have an initialization assignment.
Line 5: %TYPE must be applied to a variable, column, field or attribute.
B,D verified
DECLARE
v_wage NUMBER NOT NULL := 1000;
v_total_wages v_wage%TYPE ;
work_complete CONSTANT BOOLEAN :=TRUE;
all_work_complete work_complete%TYPE ;
Begin Null; End;
/
DECLARE
v_wage NUMBER := 1000; — this work without NOT NULL
v_total_wages v_wage%TYPE ;
work_complete BOOLEAN :=TRUE; — this work without CONSTANT
all_work_complete work_complete%TYPE ;
Begin Null; End;
/
BD