Page 1 of 1

EXCLUSIVE LOCKS IN SQL

Posted: Wed Apr 08, 2009 10:01 am
by sabariesh
SQL>CONNECT SCOTT/TIGER;
SQL>LOCK TABLE EMP IN EXCLUSIVE MODE NOWAIT;
SQL>UPDATE EMP SET SAL=1000;

The NOWAIT clause is causing the system to wait instead of displaying the
message "EMP IS USED BY ANOTHER USER" while i'm manipulating EMP of SCOTT from another system/session.

WHY?