select * from customer with (nolock);
select * from customer;
Both the above statements will give you the same results. But, there is a catch. Suppose customer table is being updated and then you execute the first query containing nolock then it might result in DIRTY READ.WITH (NOLOCK)
- It only applies to the SELECT statement. it does'nt consider the transaction scenario, even if the transaction is under process or not yet committed or rollback, it will fetch the current record no matter what. Use this feature when the performance needs to be increased.
Thanks and Regards