In SQL Server, what is the purpose of the NOLOCK query hint and what risk does it introduce?

Advanced SQL Developer Hard

Advanced SQL Developer — Hard

In SQL Server, what is the purpose of the NOLOCK query hint and what risk does it introduce?

Key points

  • NOLOCK improves concurrency by not acquiring shared locks
  • Dirty reads are possible due to uncommitted or rolled-back data
  • Risk of inconsistent data if dirty reads occur

Ready to go further?

Related questions