SQL Database Concepts Question:

Download Job Interview Questions and Answers PDF

Do you know what is a WITH(NOLOCK)?

Basic SQL Server Interview Question
Basic SQL Server Interview Question

Answer:

WITH(NOLOCK) is used to unlock the data which is locked by the transaction that is not yet committed. This command is used before SELECT statement.
When the transaction is committed or rolled back then there is no need to use NOLOCK function because the data is already released by the committed transaction.
Syntax: WITH(NOLOCK)
Example:
SELECT * FROM EmpDetails WITH(NOLOCK)
WITH(NOLCOK) is similar as READ UNCOMMITTED

Download Basic SQL Server Interview Questions And Answers PDF

Previous QuestionNext Question
Explain what is use of DBCC Commands?Explain what is Log Shipping?