MySQL trigger to update SQL Server table

2019-07-27 07:57发布

问题:

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.