Programming Blog

This blog is about technical and programming questions and there solutions. I also cover programs that were asked in various interviews, it will help you to crack the coding round of various interviews

Thursday 18 October 2018

GROUP_CONCAT in MYSQL

Syntax -
SELECT GROUP_CONCAT(DISTINCT(categories) SEPARATOR ' ') FROM table
  • DISTINCT for unique categories
  • SEPARATOR for seperate two categories by space, comma.
        for space - ' '
        for commna - ','
        for new line - '/n'



No comments:

Post a Comment