티스토리 뷰

728x90
SELECT GROUP_CONCAT(DISTINCT categories ORDER BY categories ASC SEPARATOR ' ') FROM table
 

https://stackoverflow.com/questions/3083499/mysql-distinct-on-a-group-concat

 

MySQL DISTINCT on a GROUP_CONCAT()

I am doing SELECT GROUP_CONCAT(categories SEPARATOR ' ') FROM table. Sample data below: categories ---------- test1 test2 test3 test4 test1 test3 test1 test3 However, I am getting test1 test2 test3

stackoverflow.com

 

728x90
댓글