Let's say I have a view within an enterprise application. This view is used to build a data set, and it will be called from a stored procedure and eventually return the data set to the C# ASP.NET MVC layer.
What is the difference between adding this code once, at the top of the view:
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
vs adding WITH READ UNCOMMITTED
or WITH (NOLOCK)
on every table like this:
SELECT *
FROM State WITH (READUNCOMMITTED)
JOIN City WITH (READUNCOMMITTED) ON City.StateID = State.StateID
JOIN Street WITH (READUNCOMMITTED) ON Street.CityID = City.CityID