lock record [message #39339] |
Mon, 08 July 2002 23:34 |
iyad ahmad
Messages: 1 Registered: July 2002
|
Junior Member |
|
|
there is any way to lock one record in a table,
I want to use select for update to lock just one record. How can I do that?
|
|
|
Re: lock record [message #39342 is a reply to message #39339] |
Tue, 09 July 2002 05:34 |
Suresh Vemulapalli
Messages: 624 Registered: August 2000
|
Senior Member |
|
|
declare cursor with 'for update' clause.oracle internally locks that record when you open that cursor and fetches.
example:
declare
cursor c1 is select * from emp where empno=1223 for update;
crec c1%rowtype;
begin
open c1;
fetch c1 into crec;
...
end;
|
|
|