我有3个表,我想写触发器。对这些表进行的任何更新都应在第4表D中更新 [英] i have 3 tables and i want to write trigger. any update made on these tables should be updated in 4th table D

查看:76
本文介绍了我有3个表,我想写触发器。对这些表进行的任何更新都应在第4表D中更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有3张桌子

A,B,C

我已经写了存储过程,其中包含连接条件和插入值到表D.

现在我想要的是我想写一个TRIGGER,这样在A,B,C上做的任何更新都应该在表D中更新。

我该怎么办?

请帮帮我

i have 3 tables
A,B,C
and i have written stored procedure with join condition and inserted values to table D.
Now what i want is i want to write a TRIGGER such that any update made on A,B,C should update in table D.
how do i do this??
please help me

推荐答案

如果 我理解你的问题 - 从字面上理解 - 你的问题可以很容易地解决:



你需要在每个表上放置触发器 - 不是所有三个触发器都是一个触发器。



更多细节:来自MS ^的SQL TRIGGER



If I understand your question - and take it literally - your problems can be solved easily enough:

You need to put trigger on each table - not one trigger for all three.

More details: SQL TRIGGER from MS^


这篇关于我有3个表,我想写触发器。对这些表进行的任何更新都应在第4表D中更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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