How can I generate an INSERT script for an existing SQL Server table that includes all stored rows?

The Solution to How can I generate an INSERT script for an existing SQL Server table that includes all stored rows? is


Yes, but you'll need to run it at the database level.

Right-click the database in SSMS, select "Tasks", "Generate Scripts...". As you work through, you'll get to a "Scripting Options" section. Click on "Advanced", and in the list that pops up, where it says "Types of data to script", you've got the option to select Data and/or Schema.

Screen shot of Advanced Scripting Options

~ Answered on 2011-02-21 11:30:19


Most Viewed Questions: