Inserting records using SELECT statement
Records should be selected and inserted from one table to another table using INSERT and SELECT statement.
Syntax:
INSERT INTO <tablename> SELECT <columnlist> FROM <tablename> [WHERE <conditions>];
Example
INSERT INTO employee3 SELECT * FROM employee WHERE salary >=2000;
The above instance copies records from employee table to employee3 table where the records meet the criteria specified in the WHERE clause.