What is the use of NOLOCK in SQL Server? Accretive Health Interview Questions

NOLOCK ensures your SELECT statements are fast because it doesn't have to wait for existing locks or transactions to complete before returning the results of your query. The down side is that you can end up pulling back "dirty" data - things that might have been rolled back before being committed but after your SELECT statement was run.

Ex:- SELECT * FROM Emp WITH(NOLOCK)

Note: This questions asked during Accretive Health Interview 

Comments

Archive

Contact Form

Send