Skip to content
Advertisement

Select duplicated values from one coloum and get there value in one row

i have table with 2 columns like below

I want to select all values from table but view it like below:

Advertisement

Answer

If you’re not trying to create extra columns in your output, you can simply use GROUP_CONCAT with the separator of your choice. For example:

Output:

Demo on dbfiddle

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement