Updating fetch in plsql dating site in us and canada
Once we open a cursor having a FOR UPDATE clause, all the rows returned by the SELECT statement are locked for our changes until a commit or a rollback is placed to release the lock.
After a TCL operation is performed, the cursor pointer gets reset and the cursor will be no longer accessible, thus results in an error when fetched further as shown below.
The cursor variable can be a formal subprogram parameter (see "Cursor Variables as Subprogram Parameters").
This clause can also be extended to lock only the intended table in the SELECT query containing more than one table in joins using the FOR UPDATE OF clause.
This clause becomes meaningless if we use a single table SELECT clause as the minimum Oracle has provided us with the WHERE CURRENT OF clause for both DELETE and UPDATE statements inside a cursor’s range to make changes to the last fetched row(s) from the cursor with an ease.
Therefore, commiting every so often would fix cause 1, but can do nothing about cause 2.
Are there any other scenarios where ORA-01555 can occurr?