How to use insert into table by using select query in sql

How to use insert into table by using select query in sql.

You can insert recordset at a once by using select query this way.


INSERT INTO @Tablename(Col1, Col2)     SELECT Col1, col2     FROM table2

This will select records from table2 and will insert in table1.

Comments