SSMS Tips and Tricks

Productivity Driven Development

Generate Scripts for Existing Table Schemas and Data

| Comments

To generate SQL scripts for one or more tables along with their data, right click on the database and click on Tasks->Generate Scripts. Choose the object that you want to backup and click on Next.

On the next dialog window, choose the location for your script, and then click on Advanced. By default, SQL Server only generates the script for your schema. To change this, select “Schema and Data” under General->Types of Data to Script. Finish the dialog steps and your script for the schema as well as data will be generated.

Want to learn more about SSMS? Check out this Pluralsight course.
Use SqlSmash to write maintainable SQL scripts, understand code faster and navigate around easily in SSMS.

Comments