The only thing I don’t have an automated tool for when working with SQL Server is a program that can create INSERT INTO scripts. I don’t desperately need it so I’m not going to spend money on it. I’m just wondering if there is anything out there that can be used to generate INSERT INTO scripts given an existing database without spending lots of money.
I’ve searched through SQL Server Management Studio Express with no luck in finding such a feature. If it exists in SSMSE then I’ve never found it.
This web site has many useful scripts including generating inserts.
You can utilise
sp_msforeachtablewith it to generate for an entire DB.Update: There is built-in functionality to script data as INSERTs in SQL Server Management Studio 2008(onwards).
SQL Server 2008:
Right-click on your database in SSMS, select
Tasks –> Generate Scripts, ensure your database is highlighted and click next. Scroll down the options list to the “Table/View Options” section, and change “Script Data” to True.SQL Server 2012:
Right-click on your database in SSMS, select
Tasks –> Generate Scripts. Choose the tables you want to generate scripted INSERTs for, then clickNext. Choose where you want to send the output to (such as a new Query Window), and then click theAdvancedbutton (which for some reason is in the Save to File Section!). Scroll down the options list to the “Types of data to script” option and change it to either ‘Data only’ or ‘Schema and data’. ClickNexttwice.