标签: sql-server tsql triggers
有没有办法写出像
DISABLE TRIGGER WHERE object_id = x
或不以硬编码触发器名称的其他方式?
答案 0 :(得分:3)
declare @obj sysname = object_name(xxx); declare @sql varchar(4000) = 'disable trigger ' + @obj exec(@sql)