0

Suppose i have a table with the following data:

ClientID    ClientName
3           saurabh Malhotra
4           patel Mon
6           Sajith raju
7           Vipin parmar
8           Monoj trivedi

We need to concatenate the ClientName column like the following:

saurabh Malhotra, patelMon, Sajith raju, Vipin parmar, Monoj trivedi

2 Answers2

1

Try this query

select 
     group_concat(ClientName  separator ',') as ClientName 
from (select 1 as tempcol,
           ClientName 
     from tablename)tbl
group by tempcol
Mukesh Kalgude
  • 4,814
  • 2
  • 17
  • 32
1

Try This :)

SELECT GROUP_CONCAT(ClientName) FROM Your_table_name

MySQL : Multiple row as comma separated single row

Community
  • 1
  • 1
Vishnu
  • 375
  • 4
  • 16