删除重复数据

DELETE
--select count(*) from
NBZ_O_C_FB_GG_temp_0220_02
 WHERE (ID_NBZ_OCRM_CUST_FB_GG_INTF) IN
       (SELECT ID_NBZ_OCRM_CUST_FB_GG_INTF
          FROM NBZ_O_C_FB_GG_temp_0220_02
         GROUP BY ID_NBZ_OCRM_CUST_FB_GG_INTF
        HAVING COUNT(ID_NBZ_OCRM_CUST_FB_GG_INTF) > 1)
   AND ROWID NOT IN (SELECT MIN(ROWID)
                       FROM NBZ_O_C_FB_GG_temp_0220_02
                      GROUP BY ID_NBZ_OCRM_CUST_FB_GG_INTF
                     HAVING COUNT(*) > 1);

你可能感兴趣的:(删除重复数据\函数)