数据库-查询 [英] Database - Query

查看:109
本文介绍了数据库-查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个数据库(例如,两个.mdb文件).
两者具有相同的名称,相同的表和相同的字段.
区别是一个是旧的,而另一个是更新的.bdb .mdb文件的副本.
我只想将新记录从.mdb的更新副本复制到较旧的记录.
除了遍历所有记录并仅比较和过滤较新的记录之外,还有其他方法吗?

I have two Database (eg. two .mdb file).
both have same name, same table and same field.
the difference is one is old and other is updated copy of .mdb file.
i want to copy only new records from the updated copy of the .mdb to the older one.
is there any way other than iterate trough all the records and compare and filter only newer one?

推荐答案

如果新数据库包含旧数据库中的所有数据,再加上一些新数据,然后您可以简单地用新数据库替换旧数据库.

如果将新记录复制到旧数据库中,最终将获得2个相同的数据库,这基本上就是您将要实现的目标.当您可以直接使用新数据库时,为什么要浪费时间这样做.如果您绝对需要一个副本,则只需复制整个新数据库(执行文件系统副本,这将比数据库级别的记录副本更快).
If the new database contains all the data in the old database, plus some new data, then you can simply replace the old database with the new one.

That''s basically what you will achieve if you copy the new records to the old DB, you end up with 2 identical DBs. Why waste time doing that when you can directly use the new DB. If you absolutely need a copy, then just duplicate the entire new DB (do a file system copy, which will be faster than a DB level record copy).


没有快速的答案那真的很有帮助.您所描述的过程称为复制,复制的难易程度将取决于您的数据库设计. Google支持"SQL复制"并开始阅读-值得一试!
There is no quick answer to that that is really helpfull. The process you are describing is called replication, and how easy it is to do will depend on your database design. Google for "SQL replication" and start reading - it is well worth getting to grips with!


在Visual Studio中,数据下有一个名为Data的菜单,您可以看到一个名为datacompare的菜单.尝试使用它来比较您的数据库
In Visual Studio you have a menu called Data under the data you can see the menu called datacompare .try to use this for comparing your database


这篇关于数据库-查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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