Loading...

There is several ways to insert data from one table to another table or we can create another new table and insert all the rows of existing table at same time.   

First of all we will discuss for creating new table same as any existing table without its data. Its means we will create a new table that will same duplicate of existing table without its rows or data. 
 
The SQL Query for creating new table with same structure of existing table without inserting any row

select * into <<New_Table_Name>> from <<Existing_Table_Name>> where 1=0

The SQL Query for creating new table with same structure of existing table with all row

select * into <<New_Table_Name>> from <<Existing_Table_Name>>


Now, we will insert data in to existing table from another existing table in SQL Server

insert into <<Table_Name_1>>
select * from <<Table_Name_2>>

Here, Table_Name_1 is the table name where data has to insert and Table_Name_2 is the table from where data has to copy to Table_Name_1