SELECT sysobjects.name AS trigger_name,
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
JOIN sys.tables t ON sysobjects.parent_obj = t.object_id
JOIN sys.schemas s ON t.schema_id = s.schema_id
WHERE sysobjects.type = 'TR'
AND t.name = 'TableName'
No comments:
Post a Comment