Generate INSERT statement in Management Studio


By:

Overview

Let's see how to use SQL Server Management Studio to build a simple INSERT statement for you.

Explanation

First, let's navigate to our table in SSMS located at root | Databases | Test | Tables as shown below:

SQLServerManagementStudioTables

Once we have the table list, right click on the table and select Script Table as | INSERT To | New Query Editor Window as shown below:

SQLServerManagementStudioGenerateInsertCommand

Following the steps above will generate this code:

SQLServerManagementStudioFinalInsertStatement

As you can see, using SSMS will generate a simple INSERT statement template which you can modify for your needs.






Comments For This Article

















get free sql tips
agree to terms