建立現有觸發程序的報表
接手 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.___;