Rahul Chavan
What is use of NoLock?
By Rahul Chavan in Databases & DBA on Apr 07 2016
  • Vinay Kumar Gupta
    Aug, 2017 20

    There is a situation where have possibility to more then one operation can have on same table or same time will occur in this case microsoft has been introduced Lock and WITH (NOLOCK). when read the record from tables.

    • 2
  • Vinay Kumar Gupta
    Aug, 2017 20

    There is a situation where have possibility to more then one operation can have on same table or same time will occur in this case microsoft has been introduced Lock and WITH (NOLOCK). when read the record from tables.

    • 1
  • Awadhesh Jha
    Aug, 2017 8

    WITH (NOLOCK) is the equivalent of using READ UNCOMMITED as a transaction isolation level. So, you stand the risk of reading an uncommitted row that is subsequently rolled back, i.e. data that never made it into the database. So, while it can prevent reads being deadlocked by other operations, it comes with a risk. In a banking application with high transaction rates, it's probably not going to be the right solution to whatever problem you're trying to solve with it IMHO.

    • 1
  • Rahul Chavan
    Apr, 2016 7

    If you want to write a query to retrieve the data from table and do not lock the table/ records then we use Nolock.Example-SELECT * FROM Customer WITH (NOLOCK)

    • 1


Most Popular Job Functions


MOST LIKED QUESTIONS