-
Contributing Member
For update clause
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
Last edited by babi_geek; 03-02-2008 at 10:34 PM.
-
Re: For update clause
That is used with Select statement to explicitly enforce a lock .
-
Junior Member
Re: For update clause
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.
-
Junior Member
Re: For update clause
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules