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;
时间: 2024-12-28 09:33:45
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;