1.去重語句:DELETE FROM `v_klg_item` WHERE id NOT IN (SELECT * FROM (SELECT MAX(id) FROM `v_klg_item` GROUP BY NAME) AS tmp); 2.資料庫不同表之間列的複製語句:INSERT INTO ...
1.去重語句:DELETE FROM `v_klg_item` WHERE id NOT IN (SELECT * FROM (SELECT MAX(id) FROM `v_klg_item` GROUP BY NAME) AS tmp);
2.資料庫不同表之間列的複製語句:INSERT INTO crm_add (id,address,pid) SELECT id,NAME,parentId FROM labos_area;