Pl/Sql - Record MCQ Questions And Answers
Record MCQs : This section focuses on "Record" in Pl/Sql. These Multiple Choice Questions (MCQs) should be practiced to improve the Pl/Sql skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.
1. A _________ is a data structure that can hold data items of different kinds.
A. trigger
B. cursor
C. record
D. package
View Answer
Ans : C
Explanation: A record is a data structure that can hold data items of different kinds.
2. Which of the following is a types of records?
A. Table-based
B. Cursor-based records
C. User-defined records
D. All of the above
View Answer
Ans : D
Explanation: All of the above are types of records.
3. The %ROWTYPE attribute enables a programmer to create _______ records.
A. table-based
B. cursorbased
C. table-based and cursorbased
D. None of the above
View Answer
Ans : C
Explanation: The %ROWTYPE attribute enables a programmer to create table-based and cursorbased records.
4. To access any field of a record, we use the ________ operator.
A. &
B. #
C. $
D. .
View Answer
Ans : D
Explanation: To access any field of a record, we use the dot (.) operator.
5. __________ consist of different fields, similar to a row of a database table.
A. Records
B. Trigger
C. Cursor
D. Collection
View Answer
Ans : A
Explanation: Records consist of different fields, similar to a row of a database table.
6. In how many ways to declare a record?
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : C
Explanation: PL/SQL provides three ways to declare a record: table-based record, cursor-based record and programmer-defined records.
7. You can assign a PL/SQL record NULL value by assigning an uninitialized record.
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: Yes, You can assign a PL/SQL record NULL value by assigning an uninitialized record.
8. To check if the record is NULL, you have to check each individual field of the record.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, To check if the record is NULL, you have to check each individual field of the record.
9. A PL/SQL record can be used as an argument of parameter in a ________.
A. Procedure
B. Function
C. Trigger
D. All of the above
View Answer
Ans : B
Explanation: A PL/SQL record can be used as an argument of parameter in a function.
10. PL/SQL provides a user-defined record type that allows you to define the different record structures.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, PL/SQL provides a user-defined record type that allows you to define the different record structures.
Discussion