title: Oracle and TSQL statement NO LOCK
body: <pre><code>select max(Key) from MyTable with(nolock)
  </code></pre>
  
  <p>I have this T-SQL statement but need to use one statement for both SQL Server and Oracle as well, of course the “with (nolock)” is not recognised by Oracle. Is there a way having this statement that will run on both databases. By either an Oracle ignoring the “with (nolock)” or only Sqlserver using this part of the statement or a way or coded that both with understand.</p>
  
  <p>The reason why I am using No lock is because multiple users are accessing the same table and I need to find the max value during the transactions.</p>
  
  <p>Oracle does things a bit differently so I do not have to worry about table locks.</p>