PL SQL Practice Test 12

PL SQL Practice Test 12

PL-SQL-Objective-Questions-NareshITWhere can a Varray be stored?

  1. At package or at the schema level.
  2. PL/SQL block or at the schema level.
  3. PL/SQL block or at the package level.
  4. PL/SQL block or package or at the schema level

Ans : 4


Which of the following collections can be stored in the database?

  1. Associative array and Varray
  2. Varray and nested table
  3. Associative array and nested table
  4. Associative array, Varray and nested table

Ans : 2


Which of the following collections have an initialized status as empty?

  1. Associative array
  2. Varray
  3. Nested table
  4. Records

Ans : 1


What does DELETE (m,n) do when applied on a collection variable?

  1. Deletes the mth and nth element of the collection.
  2. Deletes element before mth place and after nth place
  3. Deletes elements in the range of m to n Throws an error.
  4. This form is not supported for DELETE.

Ans : 3


Which of the following is not a characteristics of EXTEND method?

  1. EXTEND operates on the internal size of a collection.
  2. If DELETE deletes an element but keeps for it, then EXTEND considers the element exist.
  3. EXTEND adds elements to the beginning of a collection
  4. There are three forms of EXTEND procedure

Ans : 3


Attend Free Demo and Learn   SQL SERVER ONLINE TRAINING   by Real-Time Expert


What are the various forms of EXISTS method?

  1. EXISTS only
  2. EXISTS ,EXISTS(m.n) and EXISTS(n)
  3. EXISTS(n) only
  4. EXISTS and EXISTS(n)

Ans : 4


What can be present in the body of a FORALL statement?

  1. One or more DML statements
  2. A single DML statement
  3. A single SELECT or DML statement
  4. One or more SELECT statement

Ans : 2


 How many times does a PL/SQL engine access the to fetch 100 rows using       BULK SQL?

  1. Twice
  2. Once
  3. Hundred times
  4. One to 10 times depending on the batch size

Ans : 2


 Where can a BULK COLLECT clause be used?

  1. SELECT INTO statement and FETCH statement
  2. RETURNING INTO clause and SELECT INTO statement
  3. FORALL statement and SELECT INTO statement
  4. SELECT INTO statement, RETURNING INTO statement and FETCH statement

Ans : 4


Which of the following in incorrect regarding the FORALL statement?

  1. FORALL sends DML statements from PL/SQL to SQL in batches rather than one at a time.
  2. FORALL tells the PL/SQL runtime engine to bulk bind into the SQL statement
  3. FORALL statement is a FOR LOOP
  4. FORALL statement contains an iteration scheme

Ans : 3


Attend Free Demo and Learn   SQL SERVER ONLINE TRAINING   by Real-Time Expert


Which is the correct syntax to use BULK COLLECT with SELECT INTO statement?

  1. SELECT column_names BULK COLLECT INTO collection_type FROM table_name
  2. SELECT column_names INTO BULK COLLECT collection_type FROM table_name
  3. SELECT BULK column_names COLLECT INTO collection_type FROM table_name
  4. SELECT BULK COLLECT column_names INTO collection_type FROM table_name

Ans : 1


Which of the following type of variables does all BULK operations in PL/SQL fetch data?

  1. Scalar
  2. Collection
  3. Records
  4. User defined types

Ans : 2


Which of the following code correctly create a record named book with two fields?

  1. TYPE book IS RECORD (title varchar(50), author  varchar(50));
  2. RECORD book (title varchar(50),  author  varchar(50) );
  3. CREATE RECORD book (title varchar(50), author varchar(50));
  4. CREATE TYPE book(title varchar(50),  author  varchar(50));

Ans : 1


Which of the following is true about PL/SQL index-by tables?

  1. It is a set of key-value pairs.
  2. Each key is unique and is used to locate the corresponding value.
  3. The key can be either an integer or a string.
  4. All of the above.

Ans : 4


Which of the following is true about the PL/SQL data structure VARRAY?

  1. It also has a maximum size that cannot be changed.
  2. A VARRAY type is created with the CREATE VARRAY statement, at the schema level.
  3. Maximum size of a VARRAY can be changed using the ALTER TYPE statement.
  4. Maximum size of a VARRAY can be changed using the ALTER VARRAY statement.

Ans : 3


Attend Free Demo and Learn   SQL SERVER ONLINE TRAINING   by Real-Time Expert


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

  1. Table-based
  2. View-based
  3. Cursor-based records
  4. User-defined records

Ans : 2


The collection method LAST

  1. Returns the last (largest) index numbers in a collection that uses integer
  2. Returns the number of elements that a collection currently contains.
  3. Checks the Maximum Size of a Collection.
  4. None of the above.

Ans : 1


Which of the following is not true about PL/SQL nested tables?

  1. Nested table is similar to declaration of an index-by table along with INDEX BY clause.
  2. A nested table can be stored in a database column.
  3. Elements of a nested table could be a %ROWTYPE of any database table.
  4. Elements of a nested table could also be %TYPE of any database table field.

Ans : 1


Nested tables can be sparse

  1. Yes
  2. No
  3. Depends upon
  4. None

Ans : 1


Associative arrays also known as index-by tables.

  1. True
  2. False
  3. Depends upon
  4. None

Ans : 1


Attend Free Demo and Learn   SQL SERVER ONLINE TRAINING   by Real-Time Expert


Which is a group of related data items stored in fields, its own name and datatype?

  1. Record
  2. A Collection
  3. Both A & B
  4. None of the above

Ans : 1


Which collection exception is raised when  nonexistent element of an associative array?

  1. NO_DATA_FOUND
  2. COLLECTION_IS_NULL
  3. SUBSCRIPT_BEYOND_COUNT
  4. SUBSCRIPT_OUTSIDE_LIMIT

Ans : 1


Which of the following cannot be used with associative arrays?

  1. EXTEND
  2. TRIM
  3. Both A & B
  4. None of the above

Ans : 3


Arrays in other languages become varrays in PL/SQL.

  1. True
  2. False
  3. Depends upon
  4. None

Ans : 1


Collection is an ordered group of elements, all of the same type.

  1. True
  2. False
  3. Depends upon
  4. None

Ans : 1


Attend Free Demo and Learn   SQL SERVER ONLINE TRAINING   by Real-Time Expert


A collection is a function or procedure that operates on it  using dot notation.

  1. True
  2. False
  3. Depends upon
  4. None

Ans : 1


Varrays are a good choice when –

  1. The number of elements is known in advance.
  2. The elements are usually all accessed in sequence.
  3. Both A & B
  4. None of the above

Ans : 3


The collection method COUNT returns…?

  1. Returns the last (largest) index numbers in a collection that uses integer subscripts.
  2. Returns the number of elements that a collection currently contains.
  3. Checks the Maximum Size of a Collection.
  4. None of the above.

Ans : 2


Attend Free Demo and Learn   SQL SERVER ONLINE TRAINING   by Real-Time Expert


Read More PL/SQL Objective Questions and Answers

Click Here
Click Here
Click Here
PL/SQL Objectives 1
PL/SQL Objectives 2
PL/SQL Objectives 3
PL/SQL Objectives 4
PL/SQL Objectives 5
PL/SQL Objectives 6
PL/SQL Objectives 7
PL/SQL Objectives 8
PL/SQL Objectives 9
PL/SQL Objectives 10
PL/SQL Objectives 11
PL/SQL Objectives 12
PL/SQL Objectives 13
PL/SQL Objectives 14
PL/SQL Objectives 15

Share this post


Azure-devops- online training
Python online traning
MS-Azure-online training
Angular9 online training
AWS online training

Specialization on Trending Courses

Linix online training
Advance Spring online training
fullstack online training
Core java onlne training
Android online training
C#-net online training
SQL online training