Useful shortcuts for vi editor

Sunday 31 May 2015

How to use "for update" clause in Oracle?

You are able to lock a table to prevent executing Data Manupulation Language-DML commands like INSERT, UPDATE, DELETE by others users:

e.g.
SQL> SELECT * FROM employees FOR UPDATE;
-- in this way, other users could not execute DML command that hangs up until user sends COMMIT or ROLLBACK to release the table lock. However, other users are able to execute SELECT still.