MCQ Bank
What can the value of the INTO clause be while fetching data in an explicit cursor?
- A) Records only
- B) PL/SQL scalar variables only
- C) PL/SQL variables or records
- D) Collections or records only
Which of the following statements is true about record types in Oracle 11g?
- A) They are user-defined data types that group related fields
- B) They are predefined data types provided by Oracle
- C) They cannot be used as table columns.
- D) They can only store character data
........................... cursor are declared by ORACLE for each UPDATE, DELETE and INSERT SQL commands.
- A) Explicit
- B) Implicit
- C) External
- D) Internal
PL/SQL controls the context area through a cursor.
- A) FALSE
- B) TRUE
- C) Can not say
- D) Can be true or false
Which of the false statements about opening and closing an explicit cursor?
- A) Open statement identifies the result set and positions the cursor before the first row
- B) An explicit cursor is closed with the CLOSE statement.
- C) Optionally arguments can be passed to the open statement to open a cursor
- D) A cursor once closed cannot be re-opened.
Which of the following is not correct about Cursor?
- A) Cursor is a named Private SQL area
- B) SQL uses implicit Cursors to retrieve rows
- C) Cursor is used for retrieving multiple rows
- D) Cursor holds temporary results
Which of the following statements is true about propagating exceptions in Oracle 11g?
- A) All exceptions must be handled within the code block where they are raised.
- B) The RAISE_APPLICATION_ERROR procedure is used to explicitly propagate user-defined errors.
- C) Exceptions are automatically propagated by default.
- D) Propagated exceptions cannot be handled within the current code block.
Which of the following statements is true about implicit cursors?
- A) Implicit cursors are used in cursor for loops to handle data processing.
- B) Implicit cursors are used for SQL statements that are not named.
- C) . Developers should use implicit cursors with great care.
- D) Implicit cursors are no longer a feature in Oracle.
How many rows can a cursor hold?
- A) One to ten
- B) Zero only
- C) One or more
- D) One only
How many types of cursors?
- A) 2
- B) 3
- C) 1
- D) 4
What is the syntax of an implicit cursor attribute ISOPEN?
- A) %ISOPEN
- B) #ISOPEN
- C) ! ISOPEN
- D) &ISOPEN
Explicit cursors are programmer-defined cursors for gaining more control over the context area.
- A) Can not say
- B) Yes
- C) Can be yes or no
- D) No
Where do you declare an explicit cursor in the PL/SQL language?
- A) In the PL/SQL working storage section
- B) In the PL/SQL declaration section
- C) In the PL/SQL body section
- D) In the PL/SQL exception section
Programmers cannot control the _______ cursors and the information in it.
- A) both implicit & explicit
- B) implicit
- C) explicit
- D) Can not say
Which of the operations of a cursor checks for the validity of a SQL statement?
- A) OPEN
- B) PARSE
- C) BIND
- D) FETCH
......................... cursors are declared and used by the user to process multiple row, returned by SELECT statement.
- A) Explicit
- B) Implicit
- C) Internal
- D) External
The Implicit cursors are created in order to process the ____ statements.
- A) Data Manipulation Language (DML)
- B) Transaction Control Languages (TCL)
- C) Data Definition Language (DDL)
- D) Data Control Language (DCL)
Which type of cursor does an implicit and explicit cursor belong to?
- A) Database cursor
- B) Operating System cursor
- C) System cursor
- D) Session cursor
When is an implicit cursor used?
- A) DDL statement is run and the statements are not associated with any explicit cursor.
- B) SELECT/DML statement is run and the statements are not associated explicit cursor.
- C) SELECT or DML statement is run and not associated with any cursor variable.
- D) SELECT statement is run even if the statements are associated with explicit cursor.
List the correct sequence of commands to process a set of records when using explicit cursors
- A) INITIALIZE, GET, CLOSE
- B) CURSOR, FETCH, CLOSE
- C) OPEN, FETCH, CLOSE
- D) CURSOR, GET, FETCH, CLOSE