9

In MS SQL Server 2008 you can write like this:

FROM EMPLOYEE as A with (nolock)

Is there an equivalent syntax for DB2 9.7? Thanks

user1340582
  • 19,151
  • 35
  • 115
  • 171
  • 1
    `NOLOCK` is a shortcut for setting the *Read Uncommitted* [Transaction Isolation Level](http://technet.microsoft.com/en-us/library/ms378149.aspx). The DB2 equivalent appears to be [UR (Uncommitted Read)](http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/index.jsp?topic=%2Fcom.ibm.db2.luw.admin.perf.doc%2Fdoc%2Fc0004121.html). – Cristian Lupascu Oct 28 '13 at 07:46
  • apparently the DB2 equivalent would be `WITH UR`. See [Specifying the isolation level](http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/index.jsp?topic=%2Fcom.ibm.db2.luw.admin.perf.doc%2Fdoc%2Fc0004121.html) – Cristian Lupascu Oct 28 '13 at 07:57

1 Answers1

11

DB2: Uncomitted Read = WITH UR

SELECT * FROM whatevertable WITH UR
OzrenTkalcecKrznaric
  • 5,535
  • 4
  • 34
  • 57