Home » Developer & Programmer » JDeveloper, Java & XML » Table Locking Using JDBC
Table Locking Using JDBC [message #366661] Mon, 21 August 2000 10:43 Go to next message
Messages: 76
Registered: April 1999
Can anyone please update me on how to lock a table and a row in JDBC ?
Re: Table Locking Using JDBC [message #366663 is a reply to message #366661] Mon, 21 August 2000 15:55 Go to previous message
Messages: 144
Registered: March 1999
Senior Member
In SQL, using the "for update" clause locks rows specfied in the where clause until a commit or rollback releases them. e.g.

select *
from emp
where ename = 'Jones'
for update;

Locking a table explicitly is a little different - see the Oracle documentation on "lock table" e.g.

lock table emp in exclusive mode;
Previous Topic: JDBC-How to get a multi-row resultset from a SP ?
Next Topic: urgent question from novice
Goto Forum:

Current Time: Thu Aug 05 00:37:32 CDT 2021