日期:2014-05-18 浏览次数:20553 次
--有触发器约束
------解决方案--------------------
触发器中是不是有错误啊
------解决方案--------------------
select triggers.name as [触发器],tables.name as [表名],triggers.is_disabled as [是否禁用], triggers.is_instead_of_trigger AS [触发器类型], case when triggers.is_instead_of_trigger = 1 then 'INSTEAD OF' when triggers.is_instead_of_trigger = 0 then 'AFTER' else null end as [触发器类型描述] from sys.triggers triggers inner join sys.tables tables on triggers.parent_id = tables.object_id where triggers.type ='TR' order by triggers.create_date
------解决方案--------------------
SELECT 'drop trigger '+name FROM Sysobjects WHERE xtype = 'TR' and parent_obj=OBJECT_ID('表')