[英]Copying rows from one database file to another
I have 2 separate sql databases, they both have the same field but are not attached and are completely separate files. 我有2个独立的sql数据库,它们都具有相同的字段,但没有附加,并且是完全独立的文件。 One of the database files has a few hundred rows of data and I want to copy a few of those rows into the other database file. 其中一个数据库文件具有几百行数据,我想将其中的几行复制到另一个数据库文件中。 Some people have said to use sql statements to copy the data but the databases are not linked in any way so I am not sure as to how these statements would work. 有人说过使用sql语句复制数据,但是数据库没有以任何方式链接,因此我不确定这些语句如何工作。 Is there no software where I can just select the correct rows and copy them over, or create a new database with the ones selected? 没有软件可以选择正确的行并将其复制或使用选定的行创建新数据库吗?
I hope this makes sense, thanks. 我希望这是有道理的,谢谢。
Regardless of the database platform you are using, there should be commands/tools that will allow you to perform bulk data imports and exports from/to a file (eg a CSV file). 无论使用哪种数据库平台,都应该有命令/工具,使您可以执行从文件到文件(例如CSV文件)的批量数据导入和导出。 Try exporting the rows you wish to copy from the database on the first server into an intermediate file, copying that file to the second server, and then importing it into that database. 尝试将要从第一台服务器上的数据库复制的行导出到中间文件,将该文件复制到第二台服务器,然后将其导入该数据库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.