PLSQL quizzes are a fantastic way to test and enhance your knowledge of Oracle PL/SQL, is a powerful and portable language for Oracle Database development. So why waiting for, go and dive into challenging quizzes to assess your knowledge right now!
This quiz has multiple choice questions and each has only one correct answer.
Total Questions : 25
To pass this quiz you need to score 80% or above.
Time Provided : 20 minutes
Today's Date : 14 December 2024
All the best!!
a.) '0' through '9' are not equivalent to the integer literals 0 through 9
Deselect Answer
<>DECLARE p INTEGER :=10; BEGIN DECLARE p INTEGER :=100; BEGIN DBMS_OUTPUT.PUT_LINE('Value of p=' || p); END; DBMS_OUTPUT.PUT_LINE('Value of p=' || p); DECLARE p INTEGER :=1000; BEGIN DBMS_OUTPUT.PUT_LINE('Value of p=' || outer.p); outer.p := p; END; DBMS_OUTPUT.PUT_LINE('Value of p=' || p);END;Deselect Answer
a.) SIMPLE_INTEGER is a predefined subtype of the PLS_INTEGER data typeb.) PLS_INTEGER is a predefined subtype of the SIMPLE_INTEGER data typec.) SIMPLE_INTEGER has the same range as PLS_INTEGERd.) SIMPLE_INTEGER do not has a NOT NULL constrainte.) SIMPLE_INTEGER uses two's complement arithmetic and ignores overflowsDeselect Answer
DECLARE a NUMBER := NULL; b NUMBER := NULL;BEGIN IF a = b THEN DBMS_OUTPUT.PUT_LINE('a = b'); ELSIF a != b THEN DBMS_OUTPUT.PUT_LINE('a != b'); ELSE DBMS_OUTPUT.PUT_LINE('Can''t tell if two NULLs are equal'); END IF; END;Deselect Answer
referencing_item referenced_item%TYPE;
a.) PLS_INTEGER values require less storageb.) NUMBER values require less storagec.) PLS_INTEGER operations use hardware arithmetic, so they are faster than NUMBER operations, which use library arithmeticd.) For calculations outside the PLS_INTEGER range, use INTEGER, a predefined subtype of the NUMBER data typee.) A calculation with two PLS_INTEGER values that overflows the PLS_INTEGER range raises an overflow exceptionDeselect Answer
a.) EXIT and CONTINUE can appear anywhere inside a loop, but not outside a loopb.) EXIT and CONTINUE can appear anywhere inside a loop as well as outside a loopc.) Both EXIT and CONTINUE can be used with additional WHEN clause to run on specific conditiond.) Only EXIT can be used with additional WHEN clause to run on specific conditione.) Only CONTINUE can be used with additional WHEN clause to run on specific conditionDeselect Answer
DECLARE in_inventory INTEGER := 0; number_of_order INTEGER := 100;BEGIN IF (in_inventory != 0) AND ((number_of_order / in_inventory) > 5) THEN DBMS_OUTPUT.PUT_LINE('Enough inventory available'); ELSIF DBMS_OUTPUT.PUT_LINE('Inventory quantity is zero'); END IF; END;Deselect Answer
a.) DECLARE "HELLO" varchar2(10) := 'hello'; BEGIN DBMS_Output.Put_Line("Hello"); END; b.) DECLARE "HELLO" varchar2(10) := 'hello'; BEGIN DBMS_Output.Put_Line(Hello); END; c.) DECLARE "BEGIN" varchar2(15) := 'Begin'; BEGIN DBMS_Output.Put_Line(BEGIN); END;d.) DECLARE "BEGIN" varchar2(15) := 'Begin'; BEGIN DBMS_Output.Put_Line("BEGIN"); END;Deselect Answer
BEGIN FOR i IN 1..3 LOOP IF i < 3 THEN DBMS_OUTPUT.PUT_LINE (TO_CHAR(i)); ELSE i := 2; END IF; END LOOP;END;/Deselect Answer
p :=10;q :=100;r :='a';s := Null;a.) p > r is give TRUEb.) s = Null is give FALSEc.) p > s is give NULLd.) p > r is give errore.) q > p is give TRUEDeselect Answer
BEGIN FOR i IN 1..3 LOOP IF i < 3 THEN DBMS_OUTPUT.PUT_LINE (TO_CHAR(i)); END IF; END LOOP;DBMS_OUTPUT.PUT_LINE (TO_CHAR(i));END;/Deselect Answer
a.) In IF and ELSE statement, ELSE block is always executes irrespective of the IF blocks conditionb.) The IF statement either runs or skips a sequence of one or more statements, depending on a conditionc.) The CASE statement chooses from a sequence of conditions, and runs the corresponding statementd.) Simple CASE form evaluates a single expression and compares it to several potential valuese.) Searched CASE form evaluates multiple conditions and chooses the first one that is trueDeselect Answer
BEGIN FOR i IN REVERSE 1..3 LOOP IF i=i THEN DBMS_OUTPUT.PUT_LINE (i); END IF; END LOOP;END;Deselect Answer
DECLARE in_inventory INTEGER := 0; number_of_order INTEGER := 100;BEGIN IF (in_inventory = 0) OR ((number_of_order / in_inventory) < 5) THEN DBMS_OUTPUT.PUT_LINE('Inventory quantity is zero or less than 5'); ELSIF DBMS_OUTPUT.PUT_LINE('Enough inventory available'); END IF; END;Deselect Answer
If you have anything to suggest or correction on any quiz, feel free to comment in the box below