MySQL Forums
Forum List  »  Microsoft SQL Server

Re: how to convert "select * from test with(nolock)" to mysql
Posted by: Roland Bouman
Date: April 10, 2006 05:21PM

Ok, from what I read in the ms sql (2000) manual (

"Do not issue shared locks and do not honor exclusive locks. When this option is in effect, it is possible to read an uncommitted transaction or a set of pages that are rolled back in the middle of a read. Dirty reads are possible. Only applies to the SELECT statement."

would be functionally equivalent to first setting the isolation level ( to read uncommitted:

set transaction isolation level READ UNCOMMITTED;

SELECT statements are performed in a non-locking fashion, but a possible earlier version of a record might be used. Thus, using this isolation level, such reads are not consistent. This is also called a “dirty read.” Otherwise, this isolation level works like READ COMMITTED. "

and then executing the select. After that, you can of course reset the isolation level.

Options: ReplyQuote

Written By
Re: how to convert "select * from test with(nolock)" to mysql
April 10, 2006 05:21PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.