标签:res bsp oct tor 完全 custom cto 查找 code
DELETE FROM c_customer_product WHERE fid IN ( SELECT fid FROM ( SELECT fid FROM c_customer_product WHERE (fcustomer_id,fproduct_id,fis_delete) IN (SELECT fcustomer_id,fproduct_id,fis_delete FROM c_customer_product GROUP BY fcustomer_id,fproduct_id,fis_delete HAVING COUNT(*)>1) AND fid NOT IN (SELECT MIN(fid) FROM c_customer_product GROUP BY fcustomer_id,fproduct_id,fis_delete HAVING COUNT(*)>1) ) fidresult )
SELECT fid FROM ( SELECT fid FROM c_customer WHERE (fdoctor_id,fhospital_id,fis_delete) IN (SELECT fdoctor_id,fhospital_id,fis_delete FROM c_customer GROUP BY fdoctor_id,fhospital_id,fis_delete HAVING COUNT(*)>1) AND fid NOT IN (SELECT MIN(fid) FROM c_customer GROUP BY fdoctor_id,fhospital_id,fis_delete HAVING COUNT(*)>1) ) fidresult
标签:res bsp oct tor 完全 custom cto 查找 code
原文地址:https://www.cnblogs.com/liuchq/p/10496463.html