raději bych použil concat a group by
SELECT
col1,col2
FROM
tbl
GROUP BY CONCAT(LEAST(col1, col2),
GREATEST(col1, col2))
NEBO JEDNODUŠE
SELECT
col1,col2
FROM
tbl
group by LEAST(col1, col2),GREATEST(col1, col2)
raději bych použil concat a group by
SELECT
col1,col2
FROM
tbl
GROUP BY CONCAT(LEAST(col1, col2),
GREATEST(col1, col2))
NEBO JEDNODUŠE
SELECT
col1,col2
FROM
tbl
group by LEAST(col1, col2),GREATEST(col1, col2)