千家信息网

MySQL子查询

发表于:2025-01-20 作者:千家信息网编辑
千家信息网最后更新 2025年01月20日,SELECTSUBSTRING(REPLACE(REPLACE(REPLACE(REPLACE(do,'B',''),'.','0'),'_','1'),'-','1'),1,32),B.id,B.d
千家信息网最后更新 2025年01月20日MySQL子查询

SELECT

SUBSTRING(REPLACE(REPLACE(REPLACE(REPLACE(do,'B',''),'.','0'),'_','1'),'-','1'),1,32),B.id,B.du,B.phone,B.createdate,

B.modifydate FROM ca.pro AS B

WHERE SUBSTRING(REPLACE(REPLACE(REPLACE(REPLACE(do,'B',''),'.','0'),'_','1'),'-','1'),1,32) IN

(SELECT A.do1 FROM

(SELECT SUBSTRING(REPLACE(REPLACE(REPLACE(REPLACE(do,'B',''),'.','0'),'_','1'),'-','1'),1,32) AS do1,COUNT(*) AS count1 FROM ca.pro

GROUP BY SUBSTRING(REPLACE(REPLACE(REPLACE(REPLACE(do,'B',''),'.','0'),'_','1'),'-','1'),1,32)

HAVING COUNT(*) >1) AS A)

0