简体   繁体   English

将行从一个数据库文件复制到另一个

[英]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.

相关问题 使用C#上的参数从一个数据库复制行中的行 - Copying rows from one database from another with parameters on C# 在 Laravel 上将数百万行数据从一个数据库复制到另一个数据库 - Copying million rows of data from one database to another on laravel 将不存在的行从一个数据库表复制到另一数据库表? - Copying non existing rows from one database table to another database table? 将权限从一个mysql数据库复制到另一个 - Copying permissions from one mysql database to another 将一组特定的行从一个表复制到另一个表 - Copying specific set of rows from one table to another table 在指定行的同一列中将数据从一行复制到另一行 - Copying data from a one row to another in the same column for specified rows 使用所有数据从一台计算机复制到另一台计算机的MySQL数据库 - Copying a MySQL database with all data, from one computer to another 将数据从一个数据库表复制到不同服务器上的另一表 - Copying data from one database table to another table on different servers 将表从一个数据库复制到同一服务器上的另一个数据库 - Copying tables from one database to another on same server 将行从一个数据库复制到另一个数据库并更改一些值 - Copying row from one database to another and changing some values
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM