MS SQL Server with management studio - how to script a table with its data (as insert statements)? [duplicate] MS SQL Server with management studio - how to script a table with its data (as insert statements)? [duplicate] sql sql

MS SQL Server with management studio - how to script a table with its data (as insert statements)? [duplicate]


Right-click on the database name and choose Tasks -> Generate Scripts. On the Scripting Options screen set Script Data to true.


You can do it with the publish wizard

Maybe it’s well-known, but new to me, you can just run “C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Publishing\1.4\SqlPubWiz.exe”. This nifty little tool can generate INSERT script very easily.

Reference here