Freigeben über


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

Comments

  • Anonymous
    January 09, 2012
    Excellent article.What a shame it is arriving only now because i had to explain how to use this wizard on the MSDN (us) forums and as i have only french operating system and SQL Server 2008 , it is not easy to translate french towards english which is far to be good Many thanks and i hope to retrieve on this blogs articles as good as this one