MySQL trigger to update SQL Server table

北城以北 提交于 2019-12-13 17:16:18

问题


Is it possible to update a table in SQL Server using a trigger in MySQL. The scenario is like this.

When a table is updated in MySQL, a corresponding update is to be done in SQL Server for the purpose of syncing certain fields. I understand that the reverse is possible using a linked server in SQL Server.


回答1:


You can write a UDF function that would update data in the SQL Server. Then call this UDF from the trigger.




回答2:


Here's some information which may be of help regarding linking SQL Server and MySQL

http://forums.mysql.com/read.php?60,123221,123221

I'm afraid I've no personal experience in the matter as I thankfully have MySQL servers across the board, however had a scan through the links in the above and at least one of them should be able to assist.



来源:https://stackoverflow.com/questions/9414697/mysql-trigger-to-update-sql-server-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!