comma separated string of selected values in mysql

前端 未结 8 575
梦如初夏
梦如初夏 2020-11-28 08:09

I want to convert selected values into a comma separated string in MySQL. My initial code is as follows:

SELECT id FROM table_level where parent_id=4;
         


        
8条回答
  •  执念已碎
    2020-11-28 08:15

    Just so for people doing it in SQL server: use STRING_AGG to get similar results.

提交回复
热议问题