Collections:
sys.triggers - Listing All Triggers in the Database in SQL Server
How To List All Triggers in the Database with sys.triggers in SQL Server?
✍: FYIcenter.com
If you want to list all triggers defined in the current database, you can use the catalog view, sys.triggers, as shown in the following tutorial example:
USE FyiCenterData; GO CREATE TRIGGER new_user ON fyi_users AFTER INSERT AS PRINT 'New users added.'; GO SELECT * FROM sys.triggers GO name object_id parent_id type type_desc ------------ ----------- ----------- ---- ------------ dml_message 690101499 674101442 TR SQL_TRIGGER new_user 706101556 674101442 TR SQL_TRIGGER
The result shows that there are 2 triggers defined in FyiCenterData.
⇒ "ALTER TRIGGER" - Modifying Existing Triggers in SQL Server
⇐ Testing DML Triggers in SQL Server
2016-10-25, 1866🔥, 0💬
Popular Posts:
How To Get a List of All Tables with "sys.tables" View in SQL Server? If you want to see the table y...
How To Get the Definition of a Stored Procedure Back in SQL Server Transact-SQL? If you want get the...
What is sqlservr.exe - Process - SQL Server (SQLEX?PRESS) in SQL Server? Process sqlservr.exe is the...
How To Convert Numeric Values to Integers in SQL Server Transact-SQL? Sometimes you need to round a ...
How To Get Year, Month and Day Out of DATETIME Values in SQL Server Transact-SQL? You can use DATEPA...