PL SQL Practice Test 11
What are the types of composite datatypes?
- Records and Nested table
- Collections and BOOLEAN
- Collections, PLS_INTEGER and BOOLEAN
- Collections and Records
Ans : 4
Which of the following statement is true for a collection?
- In a collection, the internal components always have the same data type.
- In a collection, the internal components always have different data type
- In a collection, the internal components may have same data type or different datatype.
- All collection except records have the same datatype.
Ans : 1
How are the elements of a collection variable accessed?
- variable_name[index]
- variable_name(index)
- index
- variable_name{index}
Ans : 2
What clause is that differentiates creating an associative array from other collections?
- INDEX BY
- INDEXED BY
- INDEX OF
- INDEX WITH
Ans : 1
What are the different types of composite datatypes in PL/SQL?
- Associative array or Nested tables only
- Associative array, Varray and Nested tables
- Associative array, Varray ,Nested tables and Records
- 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?
- MAX
- MAXIMUM
- COUNT
- TOTAL
Ans : 3
What is the state of an uninitialized associative array variable?
- Error
- NULL
- Undefined
- Empty
Ans : 4
Which of the following can be used to create a collection variable?
- %TYPE
- %ROWTYPE
- %DECLARE
- %ISTYPE
Ans : 1
Where should a varray used?
- As a small look-up table
- When the maximum number of elements of the collection is known
- When the elements of the collection are accessed randomly
- For huge tables where there are lot of DML activity
Ans : 2
What is the lower bound of a varray index?
- 1
- 0
- -1
- 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?
- Maximum number of elements defined
- Current number of elements in the array
- Unlimited
- 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?
- By first obtaining the index of the elements
- Random manner
- Sequentially
- 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 ”?
- The lower bound of the varray
- The upper bound of the varray
- The current elements in the array
- 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?
- BEFORE and AFTER
- BEFORE and NEXT
- FIRST and LAST
- PRIOR and NEXT
Ans : 4
How can a varray variable be assigned values?
- Collection constructor or assignment statement or through a subprogram
- Through a subprogram only
- Collection constructor or assignment statement only
- 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?
- Throws an error
- Nothing happens
- Returns an empty collection.
- Returns a NULL collection.
Ans : 3
How can a nested table be traversed?
- Using COUNT and LIMIT methods
- Using FIRST and LAST methods
- Using FIRST and NEXT methods
- Using FIRST and COUNT methods
Ans : 3
Where are nested tables available?
- Only in database
- Only in PL/SQL
- In PL/SQL and in database
- In SQL and PL/SQL
Ans : 3
Which of the following is not the property of a nested table?
- Homogenous
- Bounded
- One dimensional
- Initially dense
Ans : 2
Where should a nested table be used?
- As a small look-up table
- When the maximum number of elements of the collection is known
- When the elements of the collection are accessed sequentially
- 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?
- No INDEX BY clause in Nested table
- No INDEX BY clause in Associative array
- No INDEXED BY clause in Nested table
- No INDEX clause in Associative array
Ans : 1
What is the only collection that does not return NULL value for LIMIT method?
- Associative array
- Varray
- Nested table
- Records
Ans : 2
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Read More PL/SQL Objective Questions and Answers