触发器执行了,操作语句没执行怎么回事?

weixin_39550830 weixin_39550830 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

alter trigger tr_flow_del
on flow_data
instead of delete
as
declare @id int;
select @id=id from deleted;
begin
insert into flow_data_bak select * from deleted;

insert into flow_run_prcs_bak select * from flow_run_prcs where id=@id;

insert into flow_run_bak select * from flow_run where id=@id;
end
go


delete from flow_data where id=100

执行之后那三张备份表里已经插入数据了,但是delete语句居然没执行, flow_data 表的那条数据还在,到底是什么鬼呢?
instead of 不能换成for,会提示 :不能在 'inserted' 表和 'deleted' 表中使用 text、ntext 或 image 列。
...全文
评论 9
收藏 已收藏
分享
返回顶部
weixin_39550830
疑难问题 22,298 成员 121,727 内容