mysql select and insert code example
Example 1: myql insert from select
INSERT INTO table_name(column_list)
SELECT
select_list
FROM
another_table
WHERE
condition;
Example 2: insert into table from another table mysql
INSERT INTO table1 (emp_id, fname)
SELECT emp_id, fname
FROM table2
WHERE status = 'Active';