Re: Lock in Oracle Tables
Updated records are locked implicitly in Oracle until the user who updated the records ends the transaction.
You can lock records explicitly in oracle by using [B]select...for update [/B]clause.
Regards,
James.
Re: Lock in Oracle Tables
[QUOTE=sripri;1055]If there is no lock specified what is the default lock that would be present in Oracle tables? Why I ask this is if two users try to update the same table is it that user has to explicitly provide locking for preventing concurrent updates or it is taken care of internally by default.[/QUOTE]
Hi,
First you have to lock the rows explicitly before some body update the rows
like below query
select * from table name
for update no wait;
use the above command to prevent other user from updating. but u can issue the dml command. locked rows will be released only when u commit or rollback the transaction
Re: Lock in Oracle Tables
Thanks you friends. I tried my hands on locking as suggested by you with the ideas given in this discussion and could get a complete idea on it.