A repository of notes about Performance Testing, Automation, RPA, and Web Design.

  • UiPath

    Show all posts related to UiPath

  • Windows

    Show all posts related to Windows

  • Web Design

    Show all posts related to Web Design

Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

[SQL Server] How to export table data as insert statements

In case you want to export all the rows in a table as insert statements, here's how to do it:
  1. Open MS SQL Server Management studio and login to your desired database server
  2. Right click database >> Tasks >> Generate Scripts
  3. Choose Objects: Select specific database objects >> Select the table you want to export
  4. Set scripting options: Select Save to file then click Advanced
  5. Under advanced >> General Options >> Types of data to script - choose Data only >> Click OK

  6. Proceed to next steps until table is successfully scripted, the click on Finish
And you're done, you've now exported table data as insert statements.
Share: