Move Copy Table From One DataBase To Another In SQL Server

Several Times We need to know How To Move Or Copy SqlServer Database Table Schema And Data From One DataBase to Another In Sql Server We can do it in following ways.

Method 1.
Open Sql Server management studio

Right Click on Database name > Tasks > Export Data.

Provide login credentials and Select Database

In next screen select database where table is to be copied

Copy data from one or more tables or views

check tables you want to copy

finish the wizard

Method 2.
We can write this query to copy tables.

SELECT * INTO DestinationDB.dbo.tableName FROM SourceDB.dbo.SourceTable

SELECT * INTO testDB.dbo.test FROM pubs.dbo.authors
This command only copies table schema and data

If you want to copy all objects,indexes,triggers,constraints etc then do it as mentioned below.
Right click on DB name > Tasks > Generate Scripts

Copy Table And Data From One DataBase to Another

Click on Advance button and select Schema And Data From Type of Data to Script section

Hope this helps.

If you like this post than join us or share

Find More Articles