Click here to Skip to main content
Click here to Skip to main content

To generate insert statement for user defined tables available in SQL Server 2000, through easy to use wizard.

, 23 Jun 2006
Rate this:
Please Sign up or sign in to vote.
It will generate insert statement as per the tables selected by the user, and it also take cares of Identity inserts in the table.

Sample Image - GenerateSQLInsertScripts.gif
First Step

Second Step

Third Step

<!------------------------------- STEP 3 ---------------------------><!-- Add the article text. Please use simple formatting (


etc) -->


By default SQL Server provides a facility to generate script for Database Objects. But their is no option offered by SQL Server to generate insert statements for the existing data in the tables. I faced this problem several times while creating application installer, I always had to ask someone to create insert statement for the master data or some data mandatory for application installation.

To overcome problem of manually generating Insert statements for SQL Server, I finally decided to build a wizard based utility that allows user to genrate insert scripts.

Using this tool

This tool is developed in C#, so we need to make sure we have Microsoft .Net Framework 1.1 installed on the system. It can generate sql scripts in 3 simple steps:

1. Enter connection detail for your SQL Server.

2. Select the tables, and organize them as per thier relation in the database i.e. Master should come first and then dependent tables to avoid refrential integrity error statements

3. Click on "Copy" button to copy generated statement to clipboard

Points of Interest

This component is as free as .Net Framework library.


1. Revised verson uploaded on 25-Jun-06  - To display truncate statements and handle UniqueIdentifier datatypes
2. Initial version added on 15-May'06


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Vivek Singh - IN
Web Developer
India India
No Biography provided

Comments and Discussions

QuestionPlease check this tool with more features PinmemberRishikesh_Singh23-Feb-12 4:57 
Questionnot generating insert statement PinmemberIMQ13-Apr-09 4:54 
AnswerRe: not generating insert statement PinmemberVivek Singh - IN13-Apr-09 7:39 
GeneralRe: not generating insert statement PinmemberIMQ13-Apr-09 9:54 
GeneralIt gives an unhandled exception Pinmemberjbmixed19-Feb-08 1:12 
GeneralGreat Tool PinmemberRussell Aboobacker31-Oct-07 3:43 
Questionharinov60 requires assistance PinadminSean Ewington24-Oct-07 5:22 
AnswerRe: harinov60 requires assistance PinmemberVivek Singh - IN25-Oct-07 1:26 
GeneralSQL Scripter PinmemberMember #35689139-Jan-07 5:18 
GeneralSQL Server 2005 PinmemberAnt6313-Dec-06 2:50 
GeneralRe: SQL Server 2005 PinmemberVivek Singh - IN13-Dec-06 21:12 
GeneralMissing quotes for uniqueidentifier column Pinmemberjtseung20-Jun-06 17:49 
GeneralRe: Missing quotes for uniqueidentifier column PinmemberVivek Singh - IN23-Jun-06 20:56 
GeneralDecimal problem PinmemberAnT5120-Jun-06 4:00 
GeneralRe: Decimal problem PinmemberVivek Singh - IN23-Jun-06 21:01 
GeneralRe: Decimal problem PinmemberAnT5130-Jun-06 0:34 
GeneralRe: Decimal problem PinmemberVivek Singh - IN30-Jun-06 0:56 
GeneralLarge databases, and another tool PinmemberSire4045-Jun-06 5:27 
GeneralRe: Large databases, and another tool PinmemberVivek Singh - IN5-Jun-06 18:18 
GeneralSource Code Missing Pinmemberdevnet24715-May-06 4:10 
GeneralRe: Source Code Missing PinmemberVivek Singh - IN15-May-06 17:44 
GeneralRe: Source Code Missing PinmemberPankaj bothara jain4-Apr-07 22:29 
GeneralRe: Source Code Missing PinmemberVivek Singh - IN9-Apr-07 6:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141223.1 | Last Updated 24 Jun 2006
Article Copyright 2006 by Vivek Singh - IN
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid