PL SQL Practice Test 11

PL SQL Practice Test 11

PL-SQL-Objective-Questions-NareshITWhat are the types of composite datatypes?

  1. Records and Nested table
  2. Collections and BOOLEAN
  3. Collections, PLS_INTEGER and BOOLEAN
  4. Collections and Records

Ans : 4


Which of the following statement is true for a collection?

  1. In a collection, the internal components always have the same data type.
  2. In a collection, the internal components always have different data type
  3. In a collection, the internal components may have same data type or different datatype.
  4. All collection except records have the same datatype.

Ans : 1


How are the elements of a collection variable accessed?

  1. variable_name[index]
  2. variable_name(index)
  3. index
  4. variable_name{index}

Ans : 2


What clause is that differentiates creating an associative array from other collections?

  1. INDEX BY
  2. INDEXED BY
  3. INDEX OF
  4. INDEX WITH

Ans : 1


What are the different types of composite datatypes in PL/SQL?

  1. Associative array or Nested tables only
  2. Associative array, Varray and Nested tables
  3. Associative array, Varray ,Nested tables and Records
  4. Associative array and Records only

Ans : 3


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


Which of the following function gives the number of elements in an associative array?

  1. MAX
  2. MAXIMUM
  3. COUNT
  4. TOTAL

Ans : 3


What is the state of an uninitialized associative array variable?

  1. Error
  2. NULL
  3. Undefined
  4. Empty

Ans : 4


Which of the following can be used to create a collection variable?

  1. %TYPE
  2. %ROWTYPE
  3. %DECLARE
  4. %ISTYPE

Ans : 1


Where should a varray used?

  1. As a small look-up table
  2. When the maximum number of elements of the collection is known
  3. When the elements of the collection are accessed randomly
  4. For huge tables where there are lot of DML activity

Ans : 2


What is the lower bound of a varray index?

  1. 1
  2. 0
  3. -1
  4. There is no fixed lower bound

Ans : 1


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


What is the upper bound of a varray index?

  1. Maximum number of elements defined
  2. Current number of elements in the array
  3. Unlimited
  4. Maximum number of elements defined -Current number of elements in the array

Ans : 2


What is the best method to access element of a varray?

  1. By first obtaining the index of the elements
  2. Random manner
  3. Sequentially
  4. Using a pointer to locate the place of the element

Ans : 3


What does the integer indicate “  TYPE arr_name IS VARRAY(integer) OF arr_type ”?

  1. The lower bound of the varray
  2. The upper bound of the varray
  3. The current elements in the array
  4. The maximum number of elements that the array can store

Ans : 4


What methods used to navigate across a varray in the forward and reverse directions?

  1. BEFORE and AFTER
  2. BEFORE and NEXT
  3. FIRST and LAST
  4. PRIOR and NEXT

Ans : 4


How can a varray variable be assigned values?

  1. Collection constructor or assignment statement or through a subprogram
  2. Through a subprogram only
  3. Collection constructor or assignment statement only
  4. Collection constructor or subprogram only

Ans : 1


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


What happens If the parameter list of the collection constructor is empty?

  1. Throws an error
  2. Nothing happens
  3. Returns an empty collection.
  4. Returns a NULL collection.

Ans : 3


How can a nested table be traversed?

  1. Using COUNT and LIMIT methods
  2. Using FIRST and LAST methods
  3. Using FIRST and NEXT methods
  4. Using FIRST and COUNT methods

Ans : 3


Where are nested tables available?

  1. Only in database
  2. Only in PL/SQL
  3. In PL/SQL and in database
  4. In SQL and PL/SQL

Ans : 3


Which of the following is not the property of a nested table?

  1. Homogenous
  2. Bounded
  3. One dimensional
  4. Initially dense

Ans : 2


Where should a nested table be used?

  1. As a small look-up table
  2. When the maximum number of elements of the collection is known
  3. When the elements of the collection are accessed sequentially
  4. When index values are not consecutive and elements must be deleted or updated

Ans :4


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


What is the main difference in syntax of creating a nested table from associative array?

  1. No INDEX BY clause in Nested table
  2. No INDEX BY clause in Associative array
  3. No INDEXED BY clause in Nested table
  4. No INDEX clause in Associative array

Ans : 1


What is the only collection that does not return NULL value for LIMIT method?

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

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