WITH (NOLOCK) vs SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

前端 未结 6 600
天涯浪人
天涯浪人 2020-12-04 06:08

Could someone give me some guidance on when I should use WITH (NOLOCK) as opposed to SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

What

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 06:59

    You cannot use Set Transaction Isolation Level Read Uncommitted in a View (you can only have one script in there in fact), so you would have to use (nolock) if dirty rows should be included.

提交回复
热议问题