Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create automatically a table populate script from current data in SQL Server?

Is there a tool that allows me to create a sql populate script for a table using its current data?

like image 446
Victor Rodrigues Avatar asked Jan 18 '10 12:01

Victor Rodrigues


1 Answers

Old question, but I got to the question before figuring out a way to solve the problem. So I'm just posting the method here in case it might help anyone else.

In SSMS:

  1. Right click on db -> "Tasks" -> "Generate Scripts..."
  2. Click "Next" and, at "Choose Objects" step, select the specific table
  3. Click "Next" and, at "Set Scription Options" step, click "Advanced"
  4. Set value for "Type of data to script", depending on what you need
  5. Continue to finish
like image 109
Gustav Avatar answered Nov 15 '22 00:11

Gustav