SELECT tags FROM neo.article; linux redis mysql java php
tags欄位專為一行顯示
SELECT group_concat(tags) FROM neo.article; linux,redis,mysql,java,php
distinct 去除重複數據
select group_concat(distinct author) from neo.article;
以id分組,把name欄位的值打印在一行,分號分隔
select id,group_concat(tags separator ';') from neo.article group by tags;
排序結果
select group_concat(distinct author order by author desc) from neo.article;