根据列连接行的字符串

Nik*_*hra 0 mysql

我哈瓦表

MsgID    Msg              value
ms001    I am here.       ----
ms001    Wher are you     dsdad
ms002    who r u          gfsdfdf
ms002    where is this    dadad
ms002    I am goin        adadad
Run Code Online (Sandbox Code Playgroud)

这可能是通过MySQL查询获得这样的结果

ms001    I am here. Wher are you
ms002    who r u wher is this I am goin  
Run Code Online (Sandbox Code Playgroud)

Luv*_*Luv 6

阅读有关group_concat的信息

SELECT MsgID , GROUP_CONCAT(Msg SEPARATOR ' ') AS Msg
FROM table1
GROUP BY MsgID;
Run Code Online (Sandbox Code Playgroud)

SQL小提琴