Home » RDBMS Server » Server Administration » select for update: a question
select for update: a question [message #371525] Thu, 02 November 2000 09:35 Go to next message
christopher
Messages: 25
Registered: September 2000
Junior Member
I would like to know whether the locks on all the rows selected by the "for update" clause in the select statement get released even though i don't update all of them.
Re: select for update: a question [message #371526 is a reply to message #371525] Thu, 02 November 2000 11:57 Go to previous messageGo to next message
Andrew again...
Messages: 270
Registered: July 2000
Senior Member
The locks are placed on all the rows targeted by the query and are unaffected by whether you update them or not. They locks are only release by commit or rollback. One subtle point is that the FK rows in child tables get locked too. If the FK's on the child tables are not indexed (they should be) then the whole child table is locked.
Re: select for update: a question [message #371550 is a reply to message #371526] Mon, 06 November 2000 10:46 Go to previous message
John R
Messages: 156
Registered: March 2000
Senior Member
An even subtler point is that if you list the columns that you wish to update, and that list doesn't include columns from the child tables, those tables aren't locked.

At least I think that's the case...
Previous Topic: V$SESSION
Next Topic: Pro*COBOL in PL/SQL
Goto Forum:
  


Current Time: Sat May 04 00:32:20 CDT 2024