SQL Interview: 64 Disabling and reenabling constraints
This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.
Section: Administration Level: Medium
Question:
You have a table called Sales.Transactions that has an associated foreign key constraint. The constraint checks that CustomerID values correctly reference the CustomerID primary key of the Sales.Customers table.
You need to bulk load some transaction data and decide to disable the constraint during the load, hoping it will increase performance of the load.
2025-07-19