Microsoft® SQL Server™ uses locking to ensure transactional integrity and database consistency. Locking prevents users from reading data being changed by other users, and prevents multiple users from changing the same data at the same time. If locking is not used, data within the database may become logically incorrect, and queries executed against that data may produce unexpected results.
Although SQL Server enforces locking automatically, you can design more efficient applications by understanding and customizing locking in your applications.