By default, SQL Server uses row-level locking. But if you make more than 5000 updates in a single transaction, SQL Server might do a lock escalation and lock the entire table in question to avoid having to handle too many individual locks. Why are SQL cursors bad? Because cursors takeRead More →