Hi,
If a transaction is updating data in a database, it gets an exclusive lock on that part of the database automatically. Then what is the use of for update clause defining it explicitly?
Regards
Babi
Printable View
Hi,
If a transaction is updating data in a database, it gets an exclusive lock on that part of the database automatically. Then what is the use of for update clause defining it explicitly?
Regards
Babi
That is used with Select statement to explicitly enforce a lock .
Hi babi,
If a transaction is updating data in a database, it gets an exclusive lock on that part of the database automatically. Up to this the Question is good After that you typed "Then what is the use of for update clause defining it explicitly?" can you retype the Question clearly.
Hi,
For Update clause is always used in a cursor(or a simple SELECT statement).
The advantage of locking a set of rows fetched by cursor(or a select statement) over an exclusive lock on an update or delete transaction is,
the set of SELECTED rows can be locked before u can modify so that denying the modification of the same set of rows by other user.
Thanks,
Savitha