How to find all trigger associated with a table with SQL Server?

后端 未结 14 1509
日久生厌
日久生厌 2020-12-13 17:46

I created a trigger for a table in SQL Server and it works for me.

My problem is: How do find it and modify it?

I use this query to find my triggers

14条回答
  •  一生所求
    2020-12-13 18:12

    select so.name, text
    from sysobjects so, syscomments sc
    where type = 'TR'
    and so.id = sc.id
    and text like '%YourTableName%'
    

    This way you can list out all the triggers associated with the given table.

提交回复
热议问题