how to copy data from one table to other in SQL Server
adam wrote:hi all
i'm trying to writing a query that copies data from one SQL Server table to another table. can anybody please help me?
copying from one table to other
Code:INSERT INTO TABLE2 SELECT * FROM TABLE1
copying from one table to other with some condition
Code:INSERT INTO TABLE2 SELECT * FROM TABLE1 WHERE COL1 = 'A'
copying specific rows from one table to other
Code:INSERT INTO TABLE2 (COL1, COL2, COL3) SELECT COL1, COL4, COL7 FROM TABLE1