sql server 2008 – auto generate insert statement€¦ · – auto generate insert statement for...

7
SQL Serv ©2012 www.varindersandhu.in This is very quick way to generate the Insert of SQL Server Let‘s take an example for this. For this demo Now we will generate the Insert statement Right click on the database and go t ver 2008 – Auto Generate Insert Statement rt Statement for all of the data in your table. This is r o created a small table as to Tasks -> Generate Scripts Page 1 really very useful feature

Upload: others

Post on 08-Jun-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SQL Server 2008 – Auto Generate Insert Statement€¦ · – Auto Generate Insert Statement for all of the data in your table . This is really very useful feature created a small

SQL Server 2008

©2012 www.varindersandhu.in

This is very quick way to generate the Insert Statement

of SQL Server

Let‘s take an example for this. For this demo

Now we will generate the Insert statement

• Right click on the database and go to

SQL Server 2008 – Auto Generate Insert Statement

to generate the Insert Statement for all of the data in your table. This is really very useful feature

this demo created a small table as

Right click on the database and go to Tasks -> Generate Scripts

Page 1

. This is really very useful feature

Page 2: SQL Server 2008 – Auto Generate Insert Statement€¦ · – Auto Generate Insert Statement for all of the data in your table . This is really very useful feature created a small

SQL Server 2008

©2012 www.varindersandhu.in

• Following window will appear

SQL Server 2008 – Auto Generate Insert Statement

Page 2

Page 3: SQL Server 2008 – Auto Generate Insert Statement€¦ · – Auto Generate Insert Statement for all of the data in your table . This is really very useful feature created a small

SQL Server 2008

©2012 www.varindersandhu.in

• Select the tables for that you want

SQL Server 2008 – Auto Generate Insert Statement

to generate the script

Page 3

Page 4: SQL Server 2008 – Auto Generate Insert Statement€¦ · – Auto Generate Insert Statement for all of the data in your table . This is really very useful feature created a small

SQL Server 2008

©2012 www.varindersandhu.in

• Click on the Advanced button.

SQL Server 2008 – Auto Generate Insert Statement

Page 4

Page 5: SQL Server 2008 – Auto Generate Insert Statement€¦ · – Auto Generate Insert Statement for all of the data in your table . This is really very useful feature created a small

SQL Server 2008

©2012 www.varindersandhu.in

• In the General category, go to Type of data to script

and Data. Select the Data Only or Schema and Data

SQL Server 2008 – Auto Generate Insert Statement

Type of data to script. There are 3 options: Schema Only

Schema and Data according to your requirement.

Page 5

Schema Only, Data Only, and Schema

Page 6: SQL Server 2008 – Auto Generate Insert Statement€¦ · – Auto Generate Insert Statement for all of the data in your table . This is really very useful feature created a small

SQL Server 2008

©2012 www.varindersandhu.in

• Your script is ready

SQL Server 2008 – Auto Generate Insert Statement

Page 6

Page 7: SQL Server 2008 – Auto Generate Insert Statement€¦ · – Auto Generate Insert Statement for all of the data in your table . This is really very useful feature created a small

SQL Server 2008

©2012 www.varindersandhu.in

• Genrated Script as

SQL Server 2008 – Auto Generate Insert Statement

Page 7