는 세 가지 유형의 레코드가 을 (MySQL의 문서 포함) ...당신이 선택할 수있는 유형을 추가 ID와 그 유형을보고 싶다면
Select Distinct id
FROM `table` t
WHERE Exists (Select * From Table Where id = t.id and Type = '1')
And Exists (Select * From Table Where id = t.id and Type = '2')
And Exists (Select * From Table Where id = t.id and Type = '3')
, 해당 ID를 가지고 모든 행을보고 싶다면
Select Distinct id, Type
FROM `table` t
WHERE Exists (Select * From Table Where id = t.id and Type = '1')
And Exists (Select * From Table Where id = t.id and Type = '2')
And Exists (Select * From Table Where id = t.id and Type = '3')
는 다음 별개의
을두고
Select id, Type
FROM `table` t
WHERE Exists (Select * From Table Where id = t.id and Type = '1')
And Exists (Select * From Table Where id = t.id and Type = '2')
And Exists (Select * From Table Where id = t.id and Type = '3')
에게이 없다 내가 뭘 Cudos가 원하는 것은 ID를 반환하는 쿼리 생각 3 가지 유형의 행이 있습니다. –