Lab 15.2 Self-Review Questions


In order to test your progress, you should be able to answer the following questions.

1)

The main benefit of using parameters with cursors is that it makes the cursor reusable.

  1. _____ True

  2. _____ False

2)

Which of the following are acceptable types of parameters to be used with cursors?

  1. _____ IN

  2. _____ OUT

  3. _____ %ROWTYPE

  4. _____ IN OUT

3)

By adding the keywords FOR UPDATE at the end of a cursor, you are

  1. _____ simply alerting the DBA that you are updating a table.

  2. _____ freeing up rollback segments for the update.

  3. _____ locking the indicated rows for an update.

  4. _____ creating a bind variable.

4)

Adding the keywords WHERE CURRENT OF to a FOR UPDATE cursor causes which of the following to take place?

  1. _____ The DBA gets annoyed.

  2. _____ Rows are locked and unlocked one at a time.

  3. _____ The update occurs for the current record in the cursor.

  4. _____ The scope of the cursor is increased.

5)

The principal difference between a FOR UPDATE cursor without a WHERE CURRENT OF clause and one with a WHERE CURRENT OF clause is that

  1. _____ without the clause the update needs to have a WHERE clause.

  2. _____ rows are only locked with the extra clause present.

  3. _____ only the items specified in the WHERE CURRENT OF clause are locked.

  4. _____ processing will only occur for the current row of the cursor.


Answers appear in Appendix A, Section 15.2.



Oracle PL[s]SQL by Example
Oracle PL[s]SQL by Example
ISBN: 3642256902
EAN: N/A
Year: 2003
Pages: 289

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net