Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以,用 nolock 不会占用任何锁。它还会尊重优秀的锁吗?例如,如果我尝试使用 nolock 选择一行,而另一个进程已在该行上设置了独占锁,那么我使用 nolock 的选择会被阻止,还是会选择该行?
我认为使用“NOLOCK”会导致脏读,这意味着在某些锁定发生之前存在的数据。假设,如果在表上设置了写锁以更新某些数据,并且我们尝试使用“NOLOCK”读取数据,则将更新之前存在的数据返回给我们。
希望这可以帮助!!