What WHERE CURRENT OF clause does in a cursor?

What WHERE CURRENT OF clause does in a cursor?

PL/SQL provides the WHERE CURRENT OF clause for both UPDATE and DELETE statements inside a cursor.This allows you to easily make changes to the most recently fetched row of data.

Syntax:
UPDATE table_name
     SET set_clause
WHERE CURRENT OF cursor_name;

Notice that the WHERE CURRENT OF clause references the cursor and not the record into which the next fetched row is deposited.
Can you pass a parameter to a cursor?
PL/SQL also allows you to pass parameters into cursors. It eases your work because.....
Functioning of CURSOR FOR LOOP with example
A Cursor is a PL/SQL construct and accesses the stored information in a named work area.....
Define Simple/Explicit , Parametric and Internal/Implicit cursor
Implicit: queries that return only one row. Explicit: can be declared by us for the queries that return more than one row..
Post your comment