Posted on

auto-generate INSERT statements for a SQL Server table

  1. Right-click on the database and go to Tasks > Generate Scripts.
  2. Select the tables that you want to generate the script.
  3. Go to Set scripting options tab and click on the Advanced button.
  4. In the General category, go to Type of data to script
  5. There are 3 options: Schema OnlyData Only, and Schema and Data. Select the appropriate option and click on OK.