Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Locking Multiple records
runa_b_at_indiatimes.com (Runa) wrote in message news:<d9bf8109.0311110229.7ed7cf1a_at_posting.google.com>...
> Is there anyway in which I can lock multiple records together, but
> release the lock one at a time i.e commit changes to one record at a
> time?
>
> Thanks.
> Runa
Just the way you phrased your question makes it appear you are thinking like you are using a files systems (locks and records) versus a database (transactions and rows). You need to think differently.
What is really your transaction? A COMMIT WORK; does an entire transaction. So if you have one transaction for all of the rows, then you commit at the end. If you have many transactions, one for each row, then commit with each row.
Take a step back and ask yourself:
what is the application problem I am trying to solve?
HTH,
Ed
PS after all that, look up
AUTONOMOUS_TRANSACTION PRAGMA
which may actually be what you need.
Received on Tue Nov 11 2003 - 15:05:39 CST