Locking rows with For update no wait [message #37029] |
Thu, 10 January 2002 19:51 |
sulinder singh
Messages: 10 Registered: January 2002
|
Junior Member |
|
|
Hi
i am trying to lock a few rows for updation using the
select *
from table
for update nowait clause,
The issue is there maybe more than one row that will locked in some cases, what i want to know is that is there any dataype that in which i can get the return set like a varray or pl/sql table. i dont want use cursor is there any other way.
Thanks and Regards
Sulinder Singh
Thanks
|
|
|
Re: Locking rows with For update no wait [message #37048 is a reply to message #37029] |
Fri, 11 January 2002 14:35 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
As soon as you do a "select...for update", it locks all of the targeted rows. You can do what you want with them after that. You can copy them into a pl/sql table etc. The locks are released when your session does a commit/rollback (implicit like with DDL or explict). The only reason you would want them in a pl/sql table is to avoid having to re-query them or if each row needed very specific processing which you could not do is pur sql statements. Pure sql statements are always preferable - try to avoid complexity where possible.
|
|
|