mysql中多个表级联问题
发布网友
发布时间:2022-04-07 18:14
我来回答
共2个回答
热心网友
时间:2022-04-07 19:43
create trigger update_id on a
for delete
as
Declare@qqlx_bid varchar(20)
Declare@qqlx_cidvarchar(20)
--获得删除记录
select @qqlx_bid=bid,@qqlx_cid=cid from deleted
update b set bid=0 where bid=@qqlx_bid;
update c set cid=0 where cid=@qqlx_cid;
end
go
热心网友
时间:2022-04-07 21:01
用事务处理追问具体怎么使用呀?触发器不能实现吗?