top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

SQL Server: What does the NOLOCK query hint do?

+5 votes
418 views
SQL Server: What does the NOLOCK query hint do?
posted Nov 18, 2013 by Atul Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+4 votes

This is the basic syntax of using NOLOCK
Select *
from Table with (NOLOCK)

It will give you data even if any transaction is still perfrmoing in Table. You can get incosistent or dirty data by this, but query performence will get increased.

answer Nov 20, 2013 by Neeraj Pandey
0 votes

With NOLOCK hint, the transaction isolation level for the SELECT statement is READ UNCOMMITTED. This means that the query may see dirty and inconsistent data.

answer Nov 18, 2013 by Jagan Mishra
...