2

我不知道如何问这个问题或者什么是正确的“关键字”来搜索/谷歌。我这里有

=========================
=   ID   =   Running#   =
=========================
=   A    =      3       =
=   A    =      4       =
=   A    =      5       =
=   E    =      6       =
=   E    =      3       =
=   G    =      4       =
=   G    =      7       =
=   T    =      3       =
=========================

我希望在一个字符串中获得 A、E、T 之类的返回值,其中它们运行# of 3

谢谢

4

1 回答 1

5

你需要为此使用GROUP_CONCAT

SELECT GROUP_CONCAT(ID)
FROM tablename
Where Running = 3
于 2012-09-12T06:16:51.480 回答