13. Understanding the Locking System : User-Controlled Locking--SET LOCKMODE : When to Change the Locking Level : Change the Locking Level with SET LOCKMODE
 
Share this page                  
Change the Locking Level with SET LOCKMODE
To specify table-level locking:
set lockmode session where level = table;
To specify row-level locking:
set lockmode session where level = row;
To specify multiversion concurrency control:
set lockmode session where level = mvcc;
Note:  For a discussion on what happens when you change the locking level with SET LOCKMODE=MVCC, see the chapter "Understanding Multiversion Concurrency Control."