为现有触发器创建报告
负责 Fresh Fruit Delivery 公司的数据库管理,也意味着需要关注当前已有的触发器。
最好的做法是准备一份可定期运行的报告,用于输出现有触发器的详细信息。
这样,您就能全面掌握触发器的总体情况,并获取一些有价值的信息。
本练习是课程的一部分
在 SQL Server 中构建与优化触发器
交互式实操练习
通过完成这段示例代码来试试这个练习。
-- 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.___;