存储过程和触发器 [英] Stored Procedure and Trigger
本文介绍了存储过程和触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我有一个疑问.我们可以在触发器内使用存储过程吗?请帮忙.
Hello,
I have a doubt.Can we use a stored procedure inside a trigger?Please help.
推荐答案
是的,我们可以在触发器内调用存储过程...
Yes we can call a stored procedure inside a trigger...
CREATE TRIGGER DemoTrigger ON YourTable AFTER delete,Update
AS
BEGIN
SET NOCOUNT ON;
Declare @id int
select @id=deleted.Id from deleted
execute dbo.YourStoredProcName @id
END
谢谢
Thank you
是的,请尝试以下链接:
http://forums.asp.net/t/1378144.aspx/1 [ ^ ]
SQL CLR:存储过程,触发器,函数–详细信息 [ ^ ]
谢谢,
Ambesha
Yes Try this links:
http://forums.asp.net/t/1378144.aspx/1[^]
SQL CLR: Stored Procedures, Triggers, Functions – The Details[^]
Thanks,
Ambesha
这篇关于存储过程和触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文