SELECT * FROM `aaa`
WHERE CONCAT( `NUM1` , `DetailNUM1` ) IN (
SELECT CONCAT( `NUM1` , `DetailNUM1` ) FROM `aaa`
GROUP BY CONCAT( `NUM1` , `DetailNUM1` ) HAVING COUNT(CONCAT( `NUM1` , `DetailNUM1` )) > 1
)
Date :
2018-01-26 14:11:17
By :
v.k
No. 3
Guest
Code (SQL)
SElECT TB1.NUM1,TB1.DetailNUM1 FROM TB1
INNER JOIN (
SELECT num1,DetailNUM1 FROM TB1
GROUP BY num1,DetailNUM1
HAVING COUNT(NUM1) > 1 AND COUNT(DetailNUM1)>1
) TB2 ON TB1.num1=TB2.num1 AND TB1.DetailNUM1=TB2.DetailNUM1