Home » Developer & Programmer » Forms » Lock table statement
Lock table statement [message #81818] Mon, 24 March 2003 17:04 Go to next message
LALA
Messages: 18
Registered: August 2002
Junior Member
Anyone here can help how to use the Lock table statement. how it works, kindly give me some sample codes. thanks
Re: Lock table statement [message #81821 is a reply to message #81818] Mon, 24 March 2003 23:34 Go to previous messageGo to next message
waris
Messages: 115
Registered: November 2001
Senior Member
Hi,

For example if u wanna lock a row in a student table..

select rollid into x from student
where rollid=99
for update of rollid;

Here the row with rollid of 99 will be locked..

and this lock will be released after commiting or rollback or exiting
out of session..

Hope this helps!!!

Cheers
waris
Re: Lock table statement [message #81827 is a reply to message #81818] Tue, 25 March 2003 03:22 Go to previous message
Hien Chung
Messages: 10
Registered: October 2002
Junior Member
Hope this helps

ex.
LOCK TABLE XYZ IN SHARE UPDATE MODE
UPDATE XYZ
SET ...

ROW SHARE allows concurrent access to the locked table, but prohibits users from locking the entire table for exclusive access. ROW SHARE is synonymous with SHARE UPDATE, which is included for compatibility with earlier versions of Oracle.
http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76965/c23cnsis.htm#3017
Previous Topic: Stroing vdioes in the database
Next Topic: Connections to DB2
Goto Forum:
  


Current Time: Thu Apr 25 20:38:12 CDT 2024