나는 내 쿼리 결과에서 모든 중복을 제거하기 위해 여러 가지를 시도했지만 그 중 아무 것도 작동하지 않았습니다. 나는 DISTINCT
과 GROUP BY
을 시도했다.SQL은 INNER JOIN과 중복을 제거합니다
DISTINCT
은 전혀 수행하지 않으며 GROUP BY
오류가 계속 발생합니다.
내 쿼리 : 사전에
SELECT
categorie.categorie_id AS categorie,
categorie.categorie_nummer,
categorie.naam,
product.product_id, product.product_naam,
foto.foto_id, foto.foto1,
item.prijs, item.item_id
FROM
((((((categorie
INNER JOIN
behoort_tot ON categorie.categorie_id = behoort_tot.categorie_id)
INNER JOIN
product ON behoort_tot.product_id = product.product_id)
INNER JOIN
heeft ON product.product_id = heeft.product_id)
INNER JOIN
foto ON heeft.foto_id = foto.foto_id)
INNER JOIN
is_een_1 ON product.product_id = is_een_1.product_id)
INNER JOIN
item ON is_een_1.item_id = item.item_id)
WHERE
(categorie.categorie_id = ?)
감사
"DISTINCT"만 있으면됩니다. – woot
'DISTINCT' 절을 사용하거나 사용하지 않고 결과를 추가 할 수 있습니까? – brazilianldsjaguar
빠른 응답을 보내 주셔서 감사합니다. 결과를 업로드하고 싶지만 10 명이 넘지 않습니다. 그러나 결과는 DISTINCT의 유무에 관계없이 동일합니다. – user3708994