Procedure to script your data (to generate INSERT statements from the existing data)

This procedure generates INSERT statements using existing data from the given tables and views. Later, you can use these INSERT statements to generate the data. It's very useful when you have to ship or package a database application. This procedure also comes in handy when you have to send sample data to your vendor or technical support provider for troubleshooting purposes.


  • Data from both tables and views can be scripted
  • No CURSORs are used
  • Table names and column names with spaces are handled
  • All datatypes are handled except images, large text and binary columns with more than 4 bytes
  • NULLs are gracefully handled
  • Timestamp columns are handled
  • Identity columns are handled
  • Very flexible and configurable
  • Non-dbo owned tables are handled
  • Computed columns are handled
  • You can filter the rows for which you want to generate INSERTs

Here is the link:

No comments: