将新记录从一个数据库复制到另一个数据库的最佳方法 [英] the best way to copy new records from one database to another

查看:33
本文介绍了将新记录从一个数据库复制到另一个数据库的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

其结构相同,甚至具有相同的 ID,现在这些数据库中的一个从实时提要中收集信息,我想要做的是找到一种方法将新记录添加到第二个数据库中,以便信息然后可以进行审查和管理,而不会干扰第一个数据库.

whose structures are identical and which even have the same id's, now one of these databases collects information from a live feed, what i want to do is find a way to add just the new records to the second database so that the information can then be reviewed and managed, without disturbing the first database.

有没有简单的方法可以做到这一点?

Is there an easy way to do this?

推荐答案

取决于您的表的大小以及您是否要对从 table1 移动到 table2 的内容进行选择性:

Depending on the size of your tables and whether or not you want to be selective about what you move from table1 to table2:

INSERT INTO table2 (field1,field2,field3)
SELECT field1,field2,field3 FROM table1

应该要诀窍,根据需要添加命令和 where 子句等!

Should to the trick, add orders and where clauses etc as required!

这篇关于将新记录从一个数据库复制到另一个数据库的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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