Insert Data into Table from other Table in SQL Server
By Santhosh N
This explains how to insert data from one Table into other Table in SQL Server directly in one single statement without using any cursors.
Selected data can be inserted from one Table to another Table using INSERT and SELECT in single statement along with conditional WHERE clause if required
to filter data and then insert.
First Approach
INSERT INTO
Table2 (Col1, Col2, Col3)
SELECT Col1, Col2, Col3
FROM Table1
WHERE [condition]
Second Approach
This approach also creates table if not created before and then inserts
SELECT Col1, Col2, Col3
INTO Table2
FROM Table1
WHERE [condition]
Related FAQs
This explains the first version of SQL Server release from Microsoft.
This explains about Denali, the new codename given to the latest SQL Server.
Insert Data into Table from other Table in SQL Server (1263 Views)