Concatenate multiple rows in single rows in MySQL

后端 未结 2 1426
傲寒
傲寒 2020-12-31 14:26

How can I concatenate all the rows in single rows when I fire SELECT query?

\"enter

2条回答
  •  误落风尘
    2020-12-31 15:05

    Use conbination of group_concat and concat functions

     SELECT group_concat( concat( id, " ",name," ",city," ",state," " ) SEPARATOR ' ')
     FROM tablename
    

提交回复
热议问题