Multiple choice technology mainframe

To allow DB2 to close a cursor after a commit or a rollback operation, we use the WITH HOLD option of the DECLARE CURSOR statement.

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To KEEP a cursor open after a commit or rollback, we use WITH HOLD. Without WITH HOLD, DB2 closes the cursor automatically at commit. The statement is phrased backwards - WITH HOLD prevents closing, rather than causing it.