Introduction
In order to disable a trigger in SQL Server, we use the DISABLE TRIGGER command.
DISABLE TRIGGER
The DISABLE TRIGGER command allows you to disable an enabled trigger contained within a table or a view.
Example
Following is an enabled insert trigger contained within a Comment
table.
In order to disable the insertComment
trigger, we will perform the following query:
DISABLE TRIGGER insertComment ON Comment
Using SQL Server Management Studio
We can also use SSMS to disable a trigger:
1- Locate the trigger you want to disable inside the triggers folder.
2- Right-click on the trigger and choose the Disable option.
3- After it's done, click the Close button.
4- Refresh the Triggers folder to see the result.
Note: this feature is not available in SQL Server Express Edition.