Updating record through cursor

I have learned how to change a set of records in one fell swoop with the UPDATE command.

updating record through cursor-23

In these type of situations, it is ideal to use a Update Cursor, than using the default read only one.

Consider the following table: Here is how you use the Update Cursor.

When we want to update or delete the cursor fetched row(s) from the database, we don’t have to form In the below code listing, the employees joined before the year 2000 are archived and during the cursor process, no other session is permitted to make any changes to those employees using the FOR UPDATE clause.

The employee deletion from the transaction table is performed using the WHERE CURRENT OF clause as shown below.

Rows Only does not seem to work with the FOR UPDATE clause.