


On the final screen, I’ve noted the generation happening, then clicked Finish. I’ve then reviewed what’s going to happen and clicked Next yet again. I’ve then chosen Save to new query window, and Next. In the Advanced Scripting Options window, scroll down to find Types of data to script and note the options:Ĭhoose Data only if that’s all you want, then OK. On the third screen, click the Advanced button.

On the second screen, choose Select specific database objects, then expand Tables, and pick the table you’re after, then click Next: You need to right-click the database, then choose Tasks, then Generate Scripts. Now, I think that option should actually be present here, but the way to get to it, is a bit more roundabout. It’s scripting an INSERT statement, not the data as a set of INSERT statements. Where people come unstuck is they right-click the table, and look at the scripting options:īut if you use the option to script INSERT to a new query window, you get this: In Object Explorer, I’ve expanded the WideWorldImporters database, then expanded Tables. SQL Server Management Studio has had the ability to do this for a long time. Over the years, I’ve had a surprising number of questions on how to output all the data in a table as a series of INSERT statements.
