What are locks in SQL?

What are locks in SQL?
There are three main types of locks that SQL Server 7.0/2000 uses:
• Shared locks
• Update locks
• Exclusive locks
Shared locks are used for operations that do not change or update data, such as a SELECT statement.
Update locks are used when SQL Server intends to modify a page, and later promotes the update page lock to an exclusive page lock before actually making the changes.
Exclusive locks are used for the data modification operations, such as UPDATE, INSERT, or DELETE.

No comments:

 
Top Blogs