Check out example codes for "insert into table from another table mysql". It will help you in understanding the concepts better.

Code Example 1

INSERT INTO table1 (emp_id, fname)
SELECT emp_id, fname 
FROM table2
WHERE status = 'Active';

Code Example 2

INSERT INTO table2 (column1, column2, column3, ...)

SELECT column1, column2, column3, ...
 FROM table1

WHERE condition;

Learn ReactJs, React Native from akashmittal.com