Friday, June 16, 2017

Sql Server: Insert all records of table to another existing table

In this article I am going to explain how to insert all records of table to another existing table in Sql server.


 Implementation:
I have created table Employee and insert some dummy records. I want to insert records of this table into another table NewEmployee.

Syntax:

Insert into table_name
Select column1, cloumn2 from table_name


Example:

Insert into dbo.NewEmployee
Select Name,Phone,Salary,Manag_Id from Employee



No comments:

Post a Comment