Cursor MCQ Questions And Answers
Cursor MCQs : This section focuses on "Cursor" 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 pointer to this context area.
A. records
B. cursor
C. packages
D. trigger
View Answer
Ans : B
Explanation: A cursor is a pointer to this context area.
2. PL/SQL controls the context area through a cursor.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, PL/SQL controls the context area through a cursor.
3. The set of rows the cursor holds is referred to as the __________.
A. inactive set
B. simple set
C. active set
D. complex set
View Answer
Ans : C
Explanation: The set of rows the cursor holds is referred to as the active set.
4. How many types of cursors?
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : B
Explanation: There are two types of cursors : Implicit cursors and Explicit cursors
5. Programmers cannot control the _______ cursors and the information in it.
A. implicit
B. explicit
C. both a and b
D. Can not say
View Answer
Ans : A
Explanation: Programmers cannot control the implicit cursors and the information in it.
6. Which attribute returns TRUE if an INSERT, UPDATE, or DELETE statement affected one or more rows?
A. %NOTFOUND
B. %ISOPEN
C. %ROWCOUNT
D. %FOUND
View Answer
Ans : D
Explanation: %FOUND : Returns TRUE if an INSERT, UPDATE, or DELETE statement affected one or more rows or a SELECT INTO statement returned one or more rows. Otherwise, it returns FALSE.
7. Which of the following is correct syntax to open the Cursor?
A. SELECT cursor_name
B. INSERT cursor_name
C. UPDATE cursor_name
D. OPEN cursor_name
View Answer
Ans : D
Explanation: OPEN cursor_name is correct syntax to open the Cursor.
8. Oracle creates ___________ when SQL statements are processed.
A. Content Areas
B. Context Areas
C. Context Ids
D. Content Ids
View Answer
Ans : B
Explanation: Oracle creates context areas when SQL statements are processed.
9. The Implicit cursors are created in order to process the ____ statements.
A. DDL
B. DCL
C. DML
D. TCL
View Answer
Ans : C
Explanation: The implicit cursors are created in order to process the DML statements such as INSERT, DELETE, UPDATE, etc.
10. Explicit cursors are programmer-defined cursors for gaining more control over the context area.
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: Yes, Explicit cursors are programmer-defined cursors for gaining more control over the context area.
Discussion