Pages

Saturday 20 April 2013

How to transfer existing table data into new table in SQL server?

We can easily transfer/copy one SQL table data into new SQL table without creating table definition using SELECT-INTO-FROM query format.
Suppose I have one SQL table named Employee with lots of data, now if I want to replicate Employee table into new table named Employee_New. So using below query we can easily achieve our task:  
Syntax:
SELECT * INTO [New_Table_Name]
FROM [Existing_Table_Name]
Example:
SELECT * INTO Employee_New
FROM Employee