Created
February 19, 2014 21:42
-
-
Save bmchild/9102285 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
/* | |
INNER JOIN sysusers | |
ON sysobjects.uid = sysusers.uid | |
*/ | |
INNER JOIN sys.tables t | |
ON sysobjects.parent_obj = t.object_id | |
INNER JOIN sys.schemas s | |
ON t.schema_id = s.schema_id | |
WHERE sysobjects.type = 'TR' and OBJECT_NAME(parent_obj) = 'MY_TABLE' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment