0

I hava table

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

Is this possible to get result like this by MySQL query

ms001    I am here. Wher are you
ms002    who r u wher is this I am goin  
1
  • 2
    You will need to read through Group_concat Commented Aug 1, 2013 at 4:40

1 Answer 1

6

Read about group_concat

SELECT MsgID , GROUP_CONCAT(Msg SEPARATOR ' ') AS Msg
FROM table1
GROUP BY MsgID;

SQL Fiddle

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.