Multiple choice technology programming languages

What must be included within a cursor when the WHERE CURRENT OF clause is used in PL/SQL?

  1. DELETE clause

  2. UPDATE clause

  3. ROWID pseudocolumn

  4. FOR UPDATE clause

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

The WHERE CURRENT OF clause requires that the cursor was declared with a FOR UPDATE clause. This clause locks the rows that will be updated or deleted, ensuring that the data hasn't changed between when the cursor was opened and when the position-based operation occurs. Without FOR UPDATE, the database cannot guarantee data integrity for the positioned operation.