- 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 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 - PL/SQL's general syntax is based on that of ADA and Pascal programming language.
B - Apart from Oracle, PL/SQL is available in TimesTen in-memory database and IBM DB2.
Answer : D
Q 2 - Which of the following is true about scalar data types in PL/SQL?
A - They hold single values with no internal components.
B - Examples of scalar data types are NUMBER, DATE, or BOOLEAN.
Answer : D
Q 3 - Which of the following is not true about PL/SQL decision making structures?
B - The IF statement also adds the keyword ELSE followed by an alternative sequence of statement.
C - The IF-THEN-ELSIF statement allows you to choose between several alternatives.
Answer : D
Q 4 - Consider the following code snippet: how many times the loop will run?
DECLARE
a number(2);
BEGIN
FOR a in 10 .. 20 LOOP
END LOOP;
END;
Answer : A
Q 5 - Which of the following is not true about PL/SQL cursors?
A - A cursor is a view on a table.
B - A cursor holds the rows (one or more) returned by a SQL statement.
C - The set of rows the cursor holds is referred to as the active set.
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 code will open a cursor named cur_employee?
Answer : A
Q 7 - Observe the syntax given below −
CREATE [OR REPLACE ] TRIGGER trigger_name
{BEFORE | AFTER | INSTEAD OF }
{INSERT [OR] | UPDATE [OR] | DELETE}
[OF col_name]
ON table_name
[REFERENCING OLD AS o NEW AS n]
[FOR EACH ROW]
WHEN (condition)
DECLARE
Declaration-statements
BEGIN
Executable-statements
EXCEPTION
Exception-handling-statements
END;
The optional [FOR EACH ROW] clause specifies
Answer : C
Q 8 - Which of the following is not true about PL/SQL package specifications?
A - The specification is the interface to the package.
C - It contains all information about the content of the package and the code for the subprograms.
Answer : C
Q 9 - The collection method COUNT
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 : B
Q 10 - Which of the following is true about the inheritance for PL/SQL Objects?
A - PL/SQL allows creating object from existing base objects.
B - To implement inheritance, the base objects should be declared as NOT FINAL.
C - The NOT INSTANTIABLE clause allows you to declare an abstract object.