Benutzer:MovGP0/SQL/Triggers
< Benutzer:MovGP0 | SQL
SQL Triggers
[Bearbeiten | Quelltext bearbeiten]List all Triggers[1]
[Bearbeiten | Quelltext bearbeiten]SELECT
sysobjects.name AS trigger_name
,USER_NAME(sysobjects.uid) AS trigger_owner
,s.name AS table_schema
,OBJECT_NAME(parent_obj) AS table_name
,OBJECTPROPERTY( id, 'ExecIsUpdateTrigger') AS isupdate
,OBJECTPROPERTY( id, 'ExecIsDeleteTrigger') AS isdelete
,OBJECTPROPERTY( id, 'ExecIsInsertTrigger') AS isinsert
,OBJECTPROPERTY( id, 'ExecIsAfterTrigger') AS isafter
,OBJECTPROPERTY( id, 'ExecIsInsteadOfTrigger') AS isinsteadof
,OBJECTPROPERTY( id, 'ExecIsTriggerDisabled') AS [disabled]
FROM sysobjects
Referenzen
[Bearbeiten | Quelltext bearbeiten]<references> [1]
- ↑ a b Need to list all triggers in SQL Server database with table name and table's schema. In: stackoverflow. Abgerufen am 2. März 2015 (englisch).