This blog post on Oracle 11g PL/SQL contains Cursors and Exception Handling Practice Questions. These Practice Questions on Cursors and Exception Handling in PLSQL Blocks will help entry level Database programmers to answer most common Oracle 11g PL/SQL Interview Questions.

Also Read : Oracle 11g PL/SQL Basic Block Structures Questions for Interview


Oracle 11g PL/SQL Cursors and Exception Handling Practice True or False Questions

1. Explicit cursors are declared automatically for all DML and SELECT statements issued within a PL/SQL block.1. Explicit cursors are declared automatically for all DML and SELECT statements issued within a PL/SQL block.
ANS: False 
2. Implicit cursors are declared and manipulated in the PL/SQL block code for handling a set of rows returned by a SELECT statement.
ANS: False
3. Some cursor variables are references or pointers to a specific work area.
ANS: True
4. In Oracle, if the UPDATE statement does not affect any rows, an error is raised.
ANS: False
5. When referencing SQL attributes, the attribute information always reflects the information from the most recent SQL statement processed.
ANS: True
6. You can process multiple rows of data from a database by creating explicit cursors.
ANS: True
7. A cursor variable assigns a name to a work area holding a specific result set, whereas an explicit cursor is simply a pointer to a work area in which a query can be processed.
ANS: False
8. Implicit and explicit cursors are considered dynamic because they are associated with specific queries.
ANS: False
9. An exception is a mechanism to trap an error that occurs in processing.
ANS: False
10. A SELECT statement within a PL/SQL block has the possibility of raising the NO_DATA_FOUND exception.
ANS: True
11. In PL/SQL, if a SELECT statement returns no rows, Oracle does not return an error.
ANS: False
12. Three arguments are required in a PRAGMA EXCEPTION_INIT statement.
ANS: False
13. In PL/SQL, comment text is not executed.
ANS: True
14. Bulk processing options can have a detrimental effect on performance.
ANS: False
15. A FORALL statement can process a group of rows in a DML operation.
ANS: True

Also Read : Oracle 11g PL/SQL Practice Questions for Interview


Oracle 11g PL/SQL Cursors and Exception Handling Modified True or False Practice Question

1. Implicit cursors are declared and manipulated in the PL/SQL block code for handling a set of rows returned by a SELECT statement. ____

ANS: False –  Explicit
2. Implicit cursors are considered static because they are associated with specific queries. _________
ANS: True
3. A(n) EXCEPTION statement within a PL/SQL block has the possibility of raising the NO_DATA_FOUND or TOO_MANY_ROWS exception. _________________________
ANS: False –  SELECT
4. If the INTO clause of a SELECT statement contains either scalar or record variables and if more than one row is selected, the TOO_MANY_ROWS error is raised. _______
ANS: True
5. A(n) PRAGMA statement instructs Oracle to use some additional information provided when compiling and executing a block. _________________________
ANS: True
6. Because Oracle does not raise an error if a(n) UPDATE does not affect any rows, you must include specific instructions in the block to raise an error if no rows are updated. ___________
ANS: True
7. An exception that has been declared must be referred to in the RAISE statement or a PL/SQL error will occur. _________________________
ANS: True
8. The SQLERRM function returns the Oracle error number. _________________________
ANS: False –  SQLCODE
9. The SQLCODE function returns the Oracle error message. _________________________
ANS: False – SQLERRM
10. The RAISE_APPLICATION_ERROR is an Oracle built-in procedure that allows the developer to associate their own error number and message to an error. _______
ANS: True
11. An error raised in the executable section of a block immediately moves processing to the EXCEPTION section of the block in search of an exception handler. _______
ANS: True

Also Read : Oracle 11g PL/SQL Handling Data in PLSQL Blocks Practice Questions


Oracle 11g PL/SQL Cursors and Exception Handling Practice Completion Questions

1. Predefined exceptions are declared in the ____________________ package, which makes these globally available on the system.1. Predefined exceptions are declared in the ____________________ package, which makes these globally available on the system.
ANS: STANDARD
2. An attempted division by zero causes the ____________________ exception.
ANS: ZERO_DIVIDE
3. An attempted violation of a unique or primary key column constraint causes the ____________________ exception.
ANS: DUP_VAL_ON_INDEX
4. A(n) ____________________ statement within a PL/SQL block has the possibility of raising the NO_DATA_FOUND or TOO_MANY_ROWS exception.
ANS: SELECT
5. If the ____________________ clause of a SELECT statement contains either scalar or record variables and if more than one row is selected, the TOO_MANY_ROWS error is raised.
ANS: INTO
6. A(n) ____________________ is one that a developer explicitly raises in the block to enforce a business rule.
ANS: user-defined exception
7. Because Oracle does not raise an error if a(n) ____________________ does not affect any rows, you must include specific instructions in the block.
ANS: UPDATE
8. The ____________________ function returns the Oracle error number.
ANS: SQLCODE
9. A good programming practice is to include ____________________ in your code to document what is being accomplished throughout the program.
ANS: comments
10. When processing many rows in a query,  ____________________ can be used to improve performance.
ANS: bulk processing options

Also Read : Oracle 11g PL/SQL Basic Block Structures Completion Questions

Also Read : Introduction to Oracle 11g PL/SQL Practice Question and Answers

http://techhowdy.com/wp-content/uploads/2017/10/Oracle-11g-PLSQL-6.pnghttp://techhowdy.com/wp-content/uploads/2017/10/Oracle-11g-PLSQL-6-150x150.pngDemonDatabase Programmingcursors and exception handling,data in plsql,data in plsql blocks,declaring the table of records,executable code,handling data in plsql,handling data in plsql blocks,idshopper = g_shopper,Oracle 11g PLSQL,questions on handling data,read oracle 11g pl/sql,table of records variableThis blog post on Oracle 11g PL/SQL contains Cursors and Exception Handling Practice Questions. These Practice Questions on Cursors and Exception Handling in PLSQL Blocks will help entry level Database programmers to answer most common Oracle 11g PL/SQL Interview Questions.Also Read : Oracle 11g PL/SQL Basic Block Structures Questions for InterviewOracle 11g PL/SQL...Latest technology news