Thursday, July 23, 2009

 

SQL Server 2008: Script Data as Inserts

I expect many people know this already but just in case you don’t: in addition to scripting your database schema as TSQL, you can also generate data insert scripts directly from SQL Server 2008 Management Studio. 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.

image

(I’m not sure if this was also present in SQL Server 2005, as I don’t have an instance to hand).



    

Powered by Blogger