Check if Trigger exists in SQL

SELECT * FROM sys.triggers, will return a table that contains a row for each object that is a trigger, with a type of TR or TA. SELECT count(*) FROM sys.triggers where name = ‘MyTrigger’, can be used if one need to look if a particular trigger exists or not. The above line of code will […]