Home » SQL & PL/SQL » SQL & PL/SQL » Locking rows with For update no wait
Locking rows with For update no wait [message #37029] Thu, 10 January 2002 19:51 Go to next message
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 Go to previous message
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.
Previous Topic: Re: Functions and Views
Next Topic: Changing the Port of The Oracle Server
Goto Forum:
  


Current Time: Thu Aug 06 09:10:34 CDT 2020