Kbase P114106: SQL-92: What is the NOLOCK locking hint feature ?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/3/2010 |
|
Status: Verified
GOAL:
What is the NOLOCK locking hint feature ?
GOAL:
What is the syntax for the NOLOCK locking hint ?
FACT(s) (Environment):
OpenEdge 10.1x
Progress 9.1E
All Supported Operating Systems
FIX:
The NOLOCK locking hint is a feature which causes a transaction to read rows that are locked by other transactions rather than blocking the transaction while waiting for the other transactions to release their locks on these rows. This is equivalent to using the READ UNCOMMITTED Transaction Isolation Level, so it will allow Dirty Reads.
Dirty Read:
Allows the transaction to read a row that has been inserted or modified by another transaction, but not committed. If the other transaction rolls back its changes, the transaction will read a row that never existed because it never committed.
The NOLOCK locking hint should be specified within the "WITH" clause of a SELECT statement:
SELECT column_list
FROM table_list
[ WHERE search_condition ]
[ GROUP BY grouping_condition ]
[ HAVING search_condition ]
[ORDER BY ordering_condition ]
[WITH locking_hints ]
[FOR UPDATE update_condition ]
For example:
SELECT * FROM Pub.Customer WHERE Balance > 1000 WITH (NOLOCK);
NOTE:
This operation is only permissible in the READ COMMITTED Isolation Level, and is only available in Progress 9.1E03 and OpenEdge 10.1A01 or later.