复制全部数据
INSERT INTO database1.table1 SELECT * FROM database2.table2;
复制存在于table2不存在于table1的数据
INSERT INTO database1.table1 a SELECT b.* FROM database2.table2 b WHERE a.id NOT IN (SELECT id FROM database2.table2)
2022-11-21 19:18:29
INSERT INTO database1.table1 SELECT * FROM database2.table2;
INSERT INTO database1.table1 a SELECT b.* FROM database2.table2 b WHERE a.id NOT IN (SELECT id FROM database2.table2)