Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Linson Daniel,
This stored procedure basically takes the data present in the tables and creates the insert script for the particular table taking care of the datatypes. However datatypes like image have not been handled here. But it could be added on.
This stored procedure has an optional parameter wherin the user can enter the list of table names seperated by commas. Otherwise it could be run without any parameters which in turn would script for all the tables present in that particular database.
The advantages of this stored procedure are
The disadvantages of this stored procedure or improvement areas would be:
Well I cant think of any ...(joking).ofcourse there are and it would be
There are more better ways to do the same thing and lots of improvements could be added on to it. So please do contribute with your suggestions.
Stored procedure to generate an insert script for a table.
Generic Script for Insert Update Stored Procedures
Scripting Stored Procedures
Automates the creation of INSERT, UPDATE & DELETE stored procedure of a table
stored procedure vs individual insert statements