SQL Server - Copy data from one database to another data base

Copy tables from one database to another in SQL Serve:



In this Post we have explained the way to copy the entire data of table from one database table to another database table.

Copy Table Schema and Data from One Database to Another:

Suppose we have:

 "Table1" table in the database first database named “First-Database “with some data and we need to copy entire structure of table and data into another database “Second-database”.

In sql server we achieve this task by the sql query. In the given description we have two data base and want to copy one data table to another data base.

Copy Table with the Data from One Database to Another in sql

select * into Second-DataBase.dbo.Table1 from First-DataBase.dbo.Table1

This query will achieve “Table1” table in Second-DataBase with all the data copied from the "Table1" table of First-DataBase.

Copy Table with the Data in sql server by sql script:


You can make script of first data base table and then run this script to another database.



Sql Server Related Other Post:

Comments

Popular posts from this blog