Introduction: In
this post I will explain how we can insert the Data of one Table to Another
Table in same Database in Sql Server.
Description:
In the previous post i have explained How to find 2nd, 3rd and N highest salary in Sql Server from Employee Table.
In the previous post i have explained How to find 2nd, 3rd and N highest salary in Sql Server from Employee Table.
select * into Copy table_Name from Table_Name
OR
select * into DATABASE NAME.TABLE NAME from DATABASE NAME.TABLE NAME
Here Copy table_Name denotes that Table in which you want to copy the Table Data.
Table_Name denotes the Table of which want to copy the Data.
Example:
select * into COPY_DETAIL from dbo.BOOK_DETAIL
OR
select * into Testing.dbo.COPY_DETAIL from Testing.dbo.Emp_salary
You see a Table name COPY_DETAIL will Created
in Database.
If yes post your comment to admire my work. You can like me on Facebook, Google+, Linkedin and Twitter via hit on Follow us Button and also can get update follow by Email.
No comments:
Post a Comment