Contact Us

Let us know to help you out quickly!

 Bharat Patel     Feb,08 2017

MsSQL - Copy Data from One Table to Another Existing Table

Today, there was a need to insert data from one table to another table. There are many ways to insert data from one to another. Sql server provides a functionality to copy data from one to another using SELECT clause also. I hope it may be helpful for you.

Syntax

insert into <table name>select <field list> from <table name from copy data>

You can insert selected field also.

insert into <table name> (field list)select <field list> from <table name from copy data>

Example

insert into table2select * from table1insert into table2 (no,name,city)select no,name,city from table1