计算触发器语法 [英] Calculating Trigger Syntax

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

问题描述

我是社区的新手,也是编写sql的人。我想为我创建的表中的某些字段编写一个新触发器,并希望有人可以帮助我。我知道如何通过企业管理器开始一个新的跳跳器,但这是我根本不熟悉的语法。基本上,我为每个特定ID都有三个数字字段。我想将所有这三个字段添加到总字段中。当填充三个数字字段中的至少一个时,我想有一个触发器来进行计算。有任何想法吗?非常感谢您的帮助。非常感谢。


newsqler

I''m a newbee to the community and to writing sql. I would like to write a new trigger for some fields in a table I created and was hoping someone could help me. I know how to start a new tigger through enterprise manager, but it''s the syntax that I''m not familiar with at all. Basically, I have three number fields for each particular ID. I want to add all these three fields up into a "total field" I would like to have a trigger to do the calculation when at least one of the three number fields is populated. Any ideas? Your help is very greatly appreciated. Thanks so much.

newsqler

推荐答案

对于MySQL触发器语法,以及创建和删除触发器,请参阅第19章触发器。请注意,这仅适用于MySQL 5.1及以上版本!


Ronald:很酷:
For the MySQL trigger syntax, and creating and dropping triggers, see Chapter 19. Triggers . Be aware that this works on MySQL 5.1 and up only!

Ronald :cool:


谢谢,我会检查一下。对不起,我应该提到我正在使用SQL 2000.这会有所作为吗?感谢您的帮助。
Thanks, I''ll check this out. I''m sorry, I should have mentioned that I''m using SQL 2000. Will that make a difference? Thanks for your help.


然后您在错误的论坛中提出了您的问题。因此我向您展示了MySQL信息。

对于SQL Server 2000,您必须查看相应的论坛。我现在将这个问题转移到那个论坛。


罗纳德:酷:
Then you have asked your question in the wrong forum. Therefore I have shown you the MySQL information.
For SQL Server 2000 you must look in the appropriate forum. I will transfer this question to that forum now.

Ronald :cool:


这篇关于计算触发器语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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