Viewing Trigger Creation and Update Detail in SQL Server

Hello everyone,

In this article, I will try to give information about the creation and updating of Trigger in SQL Server.

In SQL Server, in some cases, you may want to view the creation and update details of the Trigger.

You can easily do this using the code below.

SELECT AS [Trigger Name],
           WHEN o.type = 'TR' THEN
               'SQL DML Trigger'
           WHEN o.type = 'TA' THEN
               'DML Assembly Trigger'
       END AS [Trigger Type], AS [Schema_Name],
       OBJECT_NAME(parent_object_id) AS [Table Name],
       o.create_date [Trigger Create Date],
       o.modify_date [Trigger Modified Date]
FROM sys.objects o
    INNER JOIN sys.schemas sc
        ON o.schema_id = sc.schema_id
          type = 'TR'
          OR type = 'TA'

When you run the above code, you will see a result similar to the one below.

Viewing Trigger Creation and Update Detail in SQL Server

As you can see, we have displayed the creation and updating details of the Trigger.

Good luck to everyone in business and life.


Yavuz Selim Kart

I try to explain what I know in software and database. I am still improving myself by doing research on many programming languages. Apart from these, I am also interested in Graphic Design and Wordpress. I also have knowledge about SEO and Social media management. In short, I am a determined person who likes to work hard.

You may also like...

Don`t copy text!