关于删除数据表的问题
为什么我数据库中的表删除不了,错误提示如下:
禁止操作数据表
消息 3609,级别 16,状态 2,第 2 行
事务在触发器中结束。批处理已中止。
应该如何处理,望各位高手指教
[解决办法]
--有触发器约束
[解决办法]
触发器中是不是有错误啊
[解决办法]
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 nullend as [触发器类型描述]from sys.triggers triggersinner join sys.tables tables on triggers.parent_id = tables.object_idwhere triggers.type ='TR'order by triggers.create_date
[解决办法]
SELECT 'drop trigger '+name FROM Sysobjects WHERE xtype = 'TR' and parent_obj=OBJECT_ID('表')