同时将相同的数据插入两个不同的数据库中 [英] Insert same data in two different database simulteneously

查看:233
本文介绍了同时将相同的数据插入两个不同的数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


任何人都可以帮助我
我想在两个不同的数据库中同时插入相同的数据.
虽然两个数据库都具有相同的表及其架构....
感谢

Hi,
Any one can help me please
i want insert same data in two different database simultaneously.
While both database has same table and their schema....
thanks

推荐答案

You can do in 2 approch either you change the query where you inserting the data in one datebase at the same time you save the data in different database 

2nd one in code behind you change the connection string 2 times for insert data in 2 different database

INSERT INTO  
  db1.myTbl(value) 
INSERT INTO  
  db2.myTbl(value)


这篇关于同时将相同的数据插入两个不同的数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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