I have a table called contacts
and i want to select all the distinct contact names (int) in one line separated by comma.
Currently i am using:
SELECT DISTINCT name FROM contacts
To get this result:
11111
22222
33333
But i need to have this result:
11111, 22222, 33333
I saw some examples with XML PATH but i couldn't adapt it to my code. Can anybody help me with the query please?