oursolutionarchitectoursolutionarchitect

PL/SQL Online Quiz


Following quiz provides Multiple Choice Questions (MCQs) related to PL/SQL. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 2 - To get the server output result and display it into the screen, you need to write −

A - set serveroutput on

B - set server output on

C - set dbmsoutput on

D - set dbms output on

Answer : A

Q 3 - What is the output of the following code?

DECLARE
   x number := 4;
BEGIN
   LOOP
      dbms_output.put_line(x);
      x := x + 1;
      exit WHEN x > 5;
   END LOOP;
      dbms_output.put_line(x);
END;

A - 4

     5

     6

B - 4

     5

C - 4

D - None of the above.

Answer : A

Q 5 - What will be printed by the following PL/SQL block?

DECLARE
   a number;
   b number;
   c number;

PROCEDURE findMin(x IN number, y IN number, z OUT number) IS
BEGIN
   IF x < y THEN
      z:= x;
   ELSE
      z:= y;
   END IF;
END; 

BEGIN
   a:= 2;
   b:= 5;
   findMin(a, b, c);
   dbms_output.put_line(c);
END;

A - 2

B - 5

C - 0

D - Won’t print anything

Answer : A

plsql_questions_answers.htm