Jul 22, 2016

Drop and Disable trigger using query in SQL Server

Drop Trigger: We can drop trigger using following query.

Example:


USE [DB_NAME]
GO
DROP TRIGGER TGGR_NAME
GO


Disable Trigger: You can disable/enable trigger using following query

Example:



--Disable trigger
USE [DB_NAME]
GO
DISABLE TRIGGER TGGR_NAME ON TBL_NAME

--Enable trigger
USE [DB_NAME]
GO
ENABLE TRIGGER TGGR_NAME ON TBL_NAME