0

次のような困難なデータ出力があります。

**AD_ID         Keyword**
6005090341554   Vitamin C
6005090341554   Vitaminsiz
6005090341554   Supplement Superstores
6005090341554   #Dietary supplement

私の質問は、クエリの出力を次のようにする方法です。

**Ad_ID         Keywords**
6005090341554   Vitamin C,Vitaminsiz,Supplement Superstores,#Dietary supplement

ありがとう!

4

1 に答える 1

0

使用GROUP BYしてGROUP_CONCAT

SELECT Ad_ID,GROUP_CONCAT(Keyword) as Keywords FROM my_table GROUP by Ad_ID;
于 2012-11-20T23:39:46.993 に答える