SQL Server中的参数化触发器 [英] parameterized trigger in sql server

查看:70
本文介绍了SQL Server中的参数化触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建参数化触发器以更新一个表上的其他表update

How to create a parameterized trigger to update other table on one tables update

推荐答案

您不能.只要完成插入,删除或更新,触发器就会自动执行.谁将传递这些参数?如果需要传递参数,为什么不将其转换为存储过程?然后显式调用它.
You can''t. Triggers execute automatically whenever an Insert, Delete, or Update is done. Who will pass those parameters? If you need to pass parameters, why don''t you convert it to stored procedure? And then call it explicitly.


这篇关于SQL Server中的参数化触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆