declare
v_wage NUMBER NOT NULL := 1000;
v_total_wage v_wage%TYPE; -- cant use without value initialization
work_complete CONSTANT BOOLEAN := TRUE;
all_work_complete work_complete%TYPE;
begin
null;
end;
Only B is correct on version 18. Line 3 does not compile due to error "PLS-00218: a variable declared NOT NULL must have an initialization assignment".
Other lines compiles successfully, value of 'all_work_complete' is null.
Answer is correct (B and D)
Line 3: Variable v_total_wages will have same Data type and NOT NULL constraint than v_wage. However no default value is assigned to it, so compiler will throw an error in this line.
Line 5: %Type can be used with columns and variables (not constants).
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
trex_fcs
1 year, 10 months agoBM2000
1 year, 11 months agoPaps23
2 years, 3 months agoneziniukas
3 years, 7 months agoLimak665
3 years, 8 months agoluiseng
4 years, 6 months agonadzeya_bdc
4 years, 6 months agoromsav
4 years, 8 months agochamisso
5 years agoCosminCof
4 years, 11 months ago