I have a SQL Server 2008 database. This database has a table with 6 columns in it. I want to generate the insert scripts associated with the data only. I know how to do this part with SQL Server management studio via the "Advanced" dialog in the "Generate Scripts..." wizard. My challenge is, I only want to script 5 of the 6 columns. How do I do this?
Check out the FREE SSMS Tools Pack v2.0 - it has among a lot of other things a feature to generate INSERT
statements for data in your tables, and yes - you can pick for which columns that INSERT
statement should be:
SELECT Column1,Column2,Column3,Column4,Column5 INTO new table FROM your Existing table;
This will create a new table with the columns that you specified, then the data will be inserted in the new created table. Then script the new table that have only the five columns that you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With