Exclusive Lock in SQL Server

The lock is a mechanism to ensure data consistency. SQL Server locks the objects when the transaction is started.