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

No comments:

Post a Comment

Please do not enter any spam link in the comment box.

NUnit : Introduction

There are several unit test tools in the market, but one of them is NUnit, the most popular tool for doing unit testing. So in this tutorial...