
- PL/SQL Tutorial
- PL/SQL - Home
- PL/SQL - Overview
- PL/SQL - Environment
- PL/SQL - Basic Syntax
- PL/SQL - Data Types
- PL/SQL - Variables
- PL/SQL - Constants and Literals
- PL/SQL - Operators
- PL/SQL - Conditions
- PL/SQL - Loops
- PL/SQL - Strings
- PL/SQL - Arrays
- PL/SQL - Procedures
- PL/SQL - Functions
- PL/SQL - Cursors
- PL/SQL - Records
- PL/SQL - Exceptions
- PL/SQL - Triggers
- PL/SQL - Packages
- PL/SQL - Collections
- PL/SQL - Transactions
- PL/SQL - Date & Time
- PL/SQL - DBMS Output
- PL/SQL - Object Oriented
- PL/SQL Useful Resources
- PL/SQL - Questions and Answers
- PL/SQL - Quick Guide
- PL/SQL - Useful Resources
- PL/SQL - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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.

Q 1 - Which of the following is not true about the PL/SQL language?
A - It supports embedded SQL statements.
B - It has all the features of a modern structured programming language.
Answer : C
Q 2 - Consider the following code −
DECLARE -- Global variables num number := 95; BEGIN dbms_output.put_line('num: ' || num1); DECLARE -- Local variables num number := 195; BEGIN dbms_output.put_line('num: ' || num1); END; END;
What will happen when the code is executed?
A - It won’t execute, it has syntax error
B - It will print num: 95 num: 195
Answer : B
Q 3 - What is wrong in the following code snippet?
DECLARE x number := 1; BEGIN LOOP dbms_output.put_line(x); x := x + 1; IF x > 10 THEN exit; END IF; dbms_output.put_line('After Exit x is: ' || x); END;
B - The IF statement is not required.
Answer : C
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;
Answer : D
Q 5 - Which of the following is not true about the PL/SQL functions?
A - A PL/SQL function is same as a procedure except that it returns a value.
B - The function body must contain a RETURN statement.
C - The RETURN clause does not specify the data type of the return value.
D - The AS keyword is used instead of the IS keyword for creating a standalone function.
Answer : C
Q 6 - The pre-defined exception CASE_NOT_FOUND is raised when
B - PL/SQL has an internal problem.
C - A cursor fetches value in a variable having incompatible data type.
Answer : A
Q 7 - Which of the following is not a benefit of a database trigger?
A - Enforcing referential integrity
B - Event logging and storing information on table access
Answer : C
Q 8 - Which of the following is not true about PL/SQL packages?
B - A package has two parts: Package specification and Package body or definition.
Answer : D
Q 9 - The collection method LIMIT
A - Returns the last (largest) index numbers in a collection that uses integer subscripts.
B - Returns the number of elements that a collection currently contains.
Answer : C
Q 10 - Which of the following code will create an object type named local_address with two field house_no and street?
A -
CREATE OR REPLACE OBJECT local_address
(house_no varchar2(10),
street varchar2(30),
);
B -
CREATE OR REPLACE TYPE local_address AS OBJECT
(house_no varchar2(10),
street varchar2(30),
);
C -
CREATE OR REPLACE OBJECT local_address AS
(house_no varchar2(10),
street varchar2(30),
);
D -
CREATE OR REPLACE CLASS local_address
(house_no varchar2(10),
street varchar2(30),
);