PL/SQL Online Quiz


Advertisements


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 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 4 - Which of the following is the correct syntax for creating a VARRAY named grades, which can hold 100 integers, in a PL/SQL block?

A - TYPE grades IS VARRAY(100) OF INTEGERS;

B - VARRAY grades IS VARRAY(100) OF INTEGER;

C - TYPE grades VARRAY(100) OF INTEGER;

D - TYPE grades IS VARRAY(100) OF INTEGER;

Answer : D

Answer : A

Explanation

A cursor is a memory area, known as context area, for processing an SQL statement, which contains all information needed for processing the statement.

Q 6 - Which of the following is not among the types of PL/SQL records?

A - Table-based

B - View-based

C - Cursor-based records

D - User-defined records

Answer : B

Q 9 - Which of the following code is the correct syntax for creating a nested table named salary that will store integer values?

A - TYPE salary IS TABLE OF INTEGER;

B - TYPE salary IS NESTED TABLE OF INTEGER;

C - TABLE salary IS NESTED BY INTEGER;

D - TABLE salary IS INDEXED BY INTEGER;

Answer : A

Answer : B

Explanation

The Map method is a function implemented in such a way that its value depends upon the value of the attributes.


plsql_questions_answers.htm

Advertisements
E-Books Store