CREATE TABLE dbo.view_me ( id int NOT NULL ); GO CREATE VIEW dbo.viewed AS SELECT vm.* FROM dbo.view_me AS vm WITH(READCOMMITTED); GO SELECT v.* FROM dbo.viewed AS v WITH(NOLOCK); GO
Msg 4138, Level 16, State 1, Line 22
Conflicting locking hints are specified for table “dbo.view_me”. This may be caused by a conflicting hint specified for a view.
Thanks for reading!
If this is the kind of SQL Server stuff you love learning about, you’ll love my training. I’m offering a 75% discount to my blog readers if you click from here. I’m also available for consulting if you just don’t have time for that and need to solve performance problems quickly.