What is “nolock” in SQL Server its benefits and drawback?

Q & ACategory: DatabaseWhat is “nolock” in SQL Server its benefits and drawback?
Admin Staff asked 3 years ago

What is “nolock” in SQL Server its benefits and drawback?

1 Answers
Admin Staff answered 3 years ago

Usually we applied “nolock” in SQL Server on production servers. This is mainly used to make records being shareable on the table when any query is done from multiple users. Which means it will not prevent other queries from querying the same record parallel on the same table.
And the drawback of “nolock” is that there a some little risk that is it has tendency to return some junk data some times. Because whenever user requesting some data from table while some other are inserting or updating commands are in progress. So may be missing or some extra rows are there.