Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate select or insert script of table using SSDT in Visual Studio

Is it possible to generate select or insert script of one table using SSDT in Visual Studio 2013?

like image 384
Omer Avatar asked Mar 20 '23 03:03

Omer


1 Answers

I came across this entry hoping it would answer this question: how do I script out the data in a table? I've used SSMS in the past to generate the INSERT statements that would load the data back into a table.

These are the steps in VS 2013/SSDT 2014:

  1. Using the SQL Server Object Explorer pane, right click on the table name, choose View Data.

  2. At the top of the data pane is label Max Rows with combo box, choose All.

  3. Click on scroll/script icon to right of box and it will produce script of insert statements.

  4. The next icon to the right will send the statements straight to file.

like image 180
Lisa Avatar answered Mar 22 '23 19:03

Lisa