为两个不同的数据库创建一个触发器 [英] CREATE one trigger For two different database

查看:277
本文介绍了为两个不同的数据库创建一个触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想为两个不同的数据库创建一个触发器.
数据库名称不同,但是它们的表名称和列名称相同.
是否可以创建触发器?如果是,那么有关如何执行此操作的任何想法或提示?

Hi,

I want to create one trigger for two different databases.
The database name is different but their table names and columns name are the same.
Is it possible to create a trigger? If yes, then any idea or hint on how to do this?

推荐答案

您只能在当前数据库中创建触发器,但是触发器可以引用对象之外的对象.当前数据库.请查看以下链接以获取更多详细信息:
类似的讨论1 [
You can create a trigger only in the current database but a trigger can reference objects outside of the current database. Have a look at the following links for more details:
Similar discussion 1[^]


这篇关于为两个不同的数据库创建一个触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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