Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> how to lock a table?

how to lock a table?

From: Sascha Bohnenkamp <bonito_at_informatik.uni-bremen.de>
Date: 1998/02/13
Message-ID: <6c1cj5$g47$1@kohl.informatik.uni-bremen.de>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US