I need help with a database, it would make a distinct with several columns, for example:
andtheoutputwouldbe:
Would you like to do this on the sql server?
Thank you in advance
select distinct coluna
from
(
select coluna1 coluna from tabela
union
select coluna2 from tabela
union
select coluna3 from tabela
union
select coluna4 from tabela
)