This feature helps us to export data of a table from one database to other. Let’s open SSMS, select a database and click on Generate Scripts under Tasks as shown below:
Step 1:

Step 2:
Click on Next, It opens a wizard for selecting database objects like tables and views which scripts need to be generated.
Step 3:
We can select the entire database or specific database objects for which scripts has to be generated. We will go with option 2 (Select specific database objects) and select Employeestable.
Step 4: Click Next
Step 5:
Click on Advanced and set “Type of data to script” to “Schema and data,” Selecting this option will generate scripts for table creation as well INSERT scripts to export its data. We can save generated scripts in a clipboard or a file or new Query window. Let’s go with the new Query window option.
Step 6: Click Next and then Finish,
It will open a new query window witthe below INSERT scripts:
By using this feature, we can easily export schema and data of a database\tables. I am ending things here. I hope this article will be helpful for all.
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

SubashPosted Sep 15, 2016, 8:41 AM
Nice one
Guest UserPosted Feb 18, 2016, 8:56 AM
Thanks for showing how to generate scripts for the database, I've always done them by hand which is Tim consuming and in my case , very error prone:)) thanks again
Pawan TiwariPosted Feb 18, 2016, 4:25 AM
nice blog