Thank you for posting Rabbit. Yes, it solved my problem. Thank you very much
I used :-
( select column1 as a from tbl_customer )
UNION Distinct
( select column2 as a from tbl_customer )
Though problem has been solved but I am thinking that in this statement I need to put select statement for that many times as many columns I have from the same table. Because I am selecting the table again and again,...
User Profile
Collapse
-
Select distinct from multiple columns into one column
Hello,
The problem is that I want to select distinct values from multiple columns of one table and want to select one column.
Say column1 has values: "first","second ","third"
and column2 has values: "second","fifth ","first"
I want to select unique from the above mentioned two columns so that result is like this:-
colname: "first","second ","third","fift h"...
No activity results to display
Show More
Leave a comment: