You can use these two query-level hints to tell SQL Server how you want to deal with locking.
Nolock
================
When nolock is used, you will tell SQL Server to ignore locks and read data directly from the table. This means that you have avoided the SQL Server lock system and will greatly improve performance and scalability.
However, since you have completely bypassed the lock system, it means yourCodeThere is a risk of reading dirty data. You may be able to read illegal data that is not committed in a transaction. This is dangerous.
Rowlock
================
When rowlock is used, you will tell SQL Server to use only the row-Level Lock. you can use this keyword in select, update, and delete statements, but I only use it in update and delete statements.
You may think that when you specify the update of the primary key, a row lock will be triggered. however, when SQL server receives a batch processing with many such operations and many of these entries are in a page, you may sometimes see a page lock, in this case, a problem occurs. if you do not specify the primary key for update or delete, the database has no reason not to assume that many other things will not be affected. Therefore, it uses page lock directly, so bad things happen.
Source:
SQL Server locks
Http://www.developerfusion.com/article/1688/sql-server-locks/4/