Answers for "how to select data from one table and insert into another in mysql and adding additional column"

SQL
3

insert into table from another table mysql

INSERT INTO table1 (emp_id, fname)
SELECT emp_id, fname 
FROM table2
WHERE status = 'Active';
Posted by: Guest on May-31-2020
0

mysql insert rows to another database

CREATE TABLE db2.table LIKE db1.table;
INSERT INTO db2.table 
SELECT column_name FROM db1.table
Posted by: Guest on October-11-2021

Code answers related to "how to select data from one table and insert into another in mysql and adding additional column"

Code answers related to "SQL"

Browse Popular Code Answers by Language