select from insert into code example
Example 1: insert select
INSERT INTO table2
SELECT * FROM table1
WHERE condition;
Example 2: insert into select * sql server
INSERT INTO table2 (column1, column2, column3, ...)
SELECT column1, column2, column3, ...
FROM table1
WHERE condition;