Creating a report on existing triggers
Taking on the responsibility of administrating the database for the Fresh Fruit Delivery company also means keeping an eye on existing triggers.
The best approach is to have a report that can be run regularly and outputs details of the existing triggers.
This will ensure you have a good overview of the triggers and give you access to some interesting information.
This exercise is part of the course
Building and Optimizing Triggers in SQL Server
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
-- Get the column that contains the trigger name
SELECT ___ AS TriggerName,
parent_class_desc AS TriggerType,
create_date AS CreateDate,
modify_date AS LastModifiedDate,
is_disabled AS Disabled,
-- Get the column that tells if it's an INSTEAD OF trigger
___ AS InsteadOfTrigger
FROM sys.___;