ALTER INDEX statement is used to disable a primary key in SQL Server database.
Syntax:
ALTER INDEX constraint_name ON table_name
DISABLE;
Example:
Disable the primary key “customer_id” on the table “customers”
ALTER INDEX cricketers2_pk ON .[dbo].[cricketers2]
DISABLE;
Output:

Leave a Reply