- DBMS Tutorial
- DBMS - Home
- DBMS - Overview
- DBMS - Architecture
- DBMS - Data Models
- DBMS - Data Schemas
- DBMS - Data Independence
- Entity Relationship Model
- DBMS - ER Model Basic Concepts
- DBMS - ER Diagram Representation
- DBMS - Generalization, Aggregation
- Relational Model
- DBMS - Codd's Rules
- DBMS - Relational Data Model
- DBMS - Relational Algebra
- DBMS - ER to Relational Model
- DBMS- SQL Overview
- Relational Database Design
- DBMS - Database Normalization
- DBMS - Database Joins
- Storage and File Structure
- DBMS - Storage System
- DBMS - File Structure
- Indexing and Hashing
- DBMS - Indexing
- DBMS - Hashing
- Transaction And Concurrency
- DBMS - Transaction
- DBMS - Concurrency Control
- DBMS - Deadlock
- Backup and Recovery
- DBMS - Data Backup
- DBMS - Data Recovery
- DBMS Useful Resources
- DBMS - Quick Guide
- DBMS - Useful Resources
- DBMS - Discussion
- Selected Reading
- Q&A
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](/images/questions_and_answers.png)
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 - To get the server output result and display it into the screen, you need to write −
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;
Answer : A
Q 4 - Which of the following is not true about the PL/SQL data structure VARRAY?
A - It is a fixed-size sequential collection of elements.
B - The elements can of various data types.
C - It is used to store an ordered collection of data.
D - Each element in a VARRAY has an index associated with it.
Answer : B
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;
Answer : A
Q 6 - The pre-defined exception NO_DATA_FOUND is raised when
A - A null object is automatically assigned a value.
B - A SELECT INTO statement returns no rows.
Answer : B
Q 7 - Which of the following is not true about PL/SQL triggers?
A - Triggers are stored programs.
B - They are automatically executed or fired when some events occur.
Answer : D
Q 8 - Which of the following statement will create the specification for a package named cust_sal
A -
CREATE PACKAGE BODY cust_sal AS
PROCEDURE find_sal(c_id customers.id%type);
END cust_sal;
B -
CREATE PACKAGE cust_sal AS
PROCEDURE find_sal(c_id customers.id%type);
END cust_sal;
D -
PACKAGE cust_sal AS
PROCEDURE find_sal(c_id customers.id%type);
END cust_sal;
Answer : B
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 is true about member methods?
A - Member methods are used for manipulating the attributes of the object.
B - Declaration of a member method is provided while declaring the object type.
C - The object body defines the code for the member methods.