Transfer data from one database to another database

后端 未结 9 1804
眼角桃花
眼角桃花 2020-11-28 20:59

How to fetch the data from one database and insert in to another database table? I can\'t to do this. Please help me in transferring data from one to another.

相关标签:
9条回答
  • 2020-11-28 21:38

    There are several ways to do this, below are two options:

    Option 1 - Right click on the database you want to copy

    • Choose 'Tasks' > 'Generate scripts'

    • 'Select specific database objects'

    • Check 'Tables'

    • Mark 'Save to new query window'

    • Click 'Advanced'

    • Set 'Types of data to script' to 'Schema and data'

    • Next, Next

    You can now run the generated query on the new database.

    Option 2

    • Right click on the database you want to copy

    • 'Tasks' > 'Export Data'

    • Next, Next

    • Choose the database to copy the tables to

    • Mark 'Copy data from one or more tables or views'

    • Choose the tables you want to copy

    • Finish

    0 讨论(0)
  • 2020-11-28 21:45

    There are multiple options and depend on your needs. See the following links:

    1. Copying Data Between Servers
    2. Copy tables from one database to another in SQL Server.
    0 讨论(0)
  • 2020-11-28 21:48

    These solutions are working in case when target database is blank. In case when both databases already have some data you need something more complicated http://byalexblog.net/merge-sql-databases

    0 讨论(0)
提交回复
热议问题