PrepAway - Latest Free Exam Questions & Answers

Which of the following DELETE statements will cause this row to be deleted?

The opening of cursor CSR01 produces the following result set:
STUDENT LASTNM FIRSTNM CLASSNO
123 Brown John T100
213 Bailey James T100

312 Carter Arlene T210
465 Chas Devon T305
546 Davis Steven T405
If this Fetch statement is executed:
FETCH csr01 INTO :studnum, :firstname, :lastname, :class
Which of the following DELETE statements will cause this row to be deleted?

PrepAway - Latest Free Exam Questions & Answers

A.
DELETE ALL FROM tab01 FOR CURRENT OF csr01

B.
DELETE FROM tab01 FOR CURRENT csr01 WITH RS

C.
DELETE * FROM tab01 WHERE CURRENT csr01 WITH CS

D.
DELETE FROM tab01 WHERE CURRENT OF csr01 WITH RR

2 Comments on “Which of the following DELETE statements will cause this row to be deleted?

  1. swamy says:

    Using a cursor

    UPDATE Table
    SET Col = :new_col
    WHERE CURRENT OF cursor

    Under Repeatable Read (RR), all page and row locks are held as the cursor moves through the rows.

    WITH UR, CS, RS, RR – Isolation Level




    0



    0
  2. Chow, Kenneth KY says:

    When used with a cursor, the DELETE statement:
    Deletes only one row—the current row
    Uses the WHERE CURRENT OF clause to identify a cursor that points to the row to be deleted




    0



    0

Leave a Reply