AE
A : successfully completed but some keyword should be in lower case
DECLARE SUBTYPE new_one IS binary_integer range 0..9; my_val new_one;
BEGIN my_val :=0; dbms_output.put_line(my_val); END;
B : PLS-00218: a variable declared NOT NULL must have an initialization assignment
C : ORA-06502: PL/SQL: numeric or value error: number precision too large
D : PLS-00218: a variable declared NOT NULL must have an initialization assignment
E : Correct
DECLARE
SUBTYPE new_one IS BINARY_INTEGER RANGE 0..9;
my_val new_one;
--SUBTYPE new_string IS VARCHAR2 (5) NOT NULL;
-- PLS-00218: a variable declared NOT NULL must have an initialization assignment
--my_str new_string;
SUBTYPE new_one_1 IS NUMBER (2,1);
my_val_1 new_one;
--SUBTYPE new_one_2 IS INTEGER RANGE 1..10 NOT NULL;
-- PLS-00218: a variable declared NOT NULL must have an initialization assignment
--my_val_2 new_one_2;
SUBTYPE new_one_3 IS NUMBER (1,0);
my_val_3 new_one_3;
BEGIN
my_val := 0;
--my_str := 'abc';
--my_val_1 := 12.5; -- ORA-06502: PL/SQL: numeric or value error
--my_val_2 := 2;
my_val_3 := -1;
END;
/
A : successfully completed but some keyword should be in lower case
DECLARE SUBTYPE new_one IS binary_integer range 0..9; my_val new_one;
BEGIN my_val :=0; dbms_output.put_line(my_val); END;
B : PLS-00218: a variable declared NOT NULL must have an initialization assignment
C : ORA-06502: PL/SQL: numeric or value error: number precision too large
D : PLS-00218: a variable declared NOT NULL must have an initialization assignment
E : Correct
Correct Answer is AE not AD because subtype which is not null should be initialized
in D option.
upvoted 4 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.
Nisha1
Highly Voted 5 years, 5 months agoRakeshpro
Most Recent 2 years, 4 months agoJosephgreenson
3 years, 1 month agoCosminCof
4 years, 2 months agopeguynya
4 years, 7 months agoZayas
5 years agoSwetank123
5 years, 3 months ago