If I have a stored procedure with set transaction isolation level read uncommitted
, will it affect update statements?
I know that you should not use with (nolock)
on update/delete statements, and this does pretty much the same thing but not sure if SQL ignores it on update statements in the procedure or if I should be careful not to use it if there are update statements.
I'm not trying to figure out what the effect of using this type of locking on manipulation statements would be or whether it's a good idea. In fact, I do NOT want to use this kind of locking on manipulation statements, and so my question is whether putting "set transaction ..." at the top of my stored proc is ever going to be honored by update/delete statements or whether it will be ignored. My hope is that it is just ignored.
I am fully aware of the effects (with its pros and cons) it will have on select statements.
I read somewhere that SQL ignores with (nolock)
on update statements since like SQL Server 2005 or something like that. My hope was that if I put "set transaction ..." at the top of my proc it will apply to all select queries automatically but would not affect manipulation queries. If that's not the case, I would opt to put with (nolock)
all over the place in my select queries instead.