SyntaxFix
Write A Post
Hire A Developer
Questions
This will give DISTINCT values across all the columns:
SELECT DISTINCT value FROM ( SELECT DISTINCT a AS value FROM my_table UNION SELECT DISTINCT b AS value FROM my_table UNION SELECT DISTINCT c AS value FROM my_table ) AS derived