Identify the scenario in which you would use the current of clause for an update or delete
statement to rows fetched from a cursor.
A.
when you want to lock the rows fetched by the cursor
B.
when you want to update or delete the result set without affecting the rows in the table
C.
when you want the database not to wait if the requested rows are locked by another user
D.
when you want to ensure that the current rows fetched by the cursor are updated or deleted
D
How i see the question:
A) it is about locks, not about current of clause
B) NONSENCE, RAVE, we can’t delete/update rows from table witjout affecting row in the table
C) For Update NOWAIT clause
D) FOR UPDATE + CURRENT OF
“when you want to ensure” it is about exclusive rows lock in FOR UPDATE
“current rows fetched by cursor” it is about CURRENT OF in FOR UPDATE clause
http://oraclexpert.com/basic-oracle-dba/sql/for-update-clause-in-a-select-statement/
http://sql-plsql.blogspot.com/2007/05/oracle-plsql-where-current-of-for.html
Thanks, Links were helpfull
D for sure
d
D
D
WHERE CURRENT OF STATEMENT
This Oracle tutorial explains how to use the Oracle/PLSQL WHERE CURRENT OF statement with syntax and examples
WHERE CURRENT OF & FOR UPDATE
The WHERE CURRENT OF clause is used in some UPDATE and DELETE statements.
The WHERE CURRENT OF clause in an UPDATE or DELETE statement states that the most recent row fetched from the table should be updated or deleted. We must declare the cursor with the FOR UPDATE clause to use this feature.
Inside a cursor loop, WHERE CURRENT OF allows the current row to be directly updated.
D
D
d