Filter data from multiple sql columns

Asked

Viewed 347 times

0

I am in need of help with a database, it would be to do a distinct with several columns, for example:

inserir a descrição da imagem aqui

and the exit would be:

inserir a descrição da imagem aqui

You could do this on sql server?

Thanks in advance

1 answer

1

select distinct coluna
from
(
 select coluna1 coluna from tabela
 union
 select coluna2 from tabela
 union
 select coluna3 from tabela
 union
 select coluna4 from tabela
)
  • Thanks for the tip... I managed to settle here with her.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.