Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> how to lock a table?
Helo,
I use pl/sql on oracle7.x and have the following problem:
I want to update a set, if it exists, or else insert it into one table ...
I tried
lock table in exclusive mode
select from that table
if(exists)
update table
else
insert into table
well it does NOT work, because the lock does NOT lock the select, but the update-insert ...
I solved it with something like
set transaction mode serializable
but this seems to me like a hammer ... what is the REAL solution, please !!!! Received on Fri Feb 13 1998 - 00:00:00 CST
![]() |
![]() |