在Sql2000中获取针对一个数据库的所有触发器
可用如下Sql语句实现
select so2.name as [Table] , so1.name [Trigger],
so1.refdate,
case sc.encrypted
when 0 then sc.text
else 'unreadable'
end
as Defination
from syscomments sc inner join sysobjects so1 on sc.id= so1.id
inner join sysobjects so2 on so1.parent_obj = so2.id
where so1.xtype='TR' and so2.xtype='U'
可用如下Sql语句实现
select so2.name as [Table] , so1.name [Trigger],
so1.refdate,
case sc.encrypted
when 0 then sc.text
else 'unreadable'
end
as Defination
from syscomments sc inner join sysobjects so1 on sc.id= so1.id
inner join sysobjects so2 on so1.parent_obj = so2.id
where so1.xtype='TR' and so2.xtype='U'