Potresti usare LEAST()
e GREATEST()
funzioni, insieme a DISTINCT
:
SELECT DISTINCT LEAST(a, b), GREATEST(a, b) FROM mytable
Potresti usare LEAST()
e GREATEST()
funzioni, insieme a DISTINCT
:
SELECT DISTINCT LEAST(a, b), GREATEST(a, b) FROM mytable