Exporting Selected tables from a SQL Database

Many times we run into a requirement when we have to export few tables from a database. Now it could be for sharing that information with someone else or sending it to the support guys. One of the easiest way to achieve same is by using SQL Import and Export Wizard.

Following is a walkthrough of exporting selected tables from a SQL database. (we would be exporting few tables from Northwind database). By following the below mentioned steps we would end up with a new database with only our selected tables.

Connect to the SQL instance using SQL Management Studio which has the database from which we need to export tables.

clip_image001

Select database > Tasks > Export Data

clip_image002

This would launch ‘SQL Server Import and Export Wizard’

clip_image003

Select the Server name and database name from which we need to export tables.

clip_image004

Destination Server information

clip_image005

You can specify the server name (it could be same or it can be a different instance)

In Database select new

clip_image006

Once you click on New for database you would be prompted with a screen like below where you can specify the database name.

clip_image007

clip_image008

Now we have information to proceed

clip_image009

Click on Next and then select 1st option “Copy data from one or more tables or views”

clip_image010

Now select the tables that you want to export.

clip_image011

clip_image012

clip_image013

Summary screen

clip_image014

clip_image015

clip_image016

Now you can see the exported tables in new database.

clip_image017

You can take backup of that database and send it across if needed.

How to: Back Up a Database (SQL Server Management Studio)

https://msdn.microsoft.com/en-us/library/ms187510.aspx

Content developed by: Romit Gulati

Content reviewed by: Lakhminder Singh