How can I concatenate all the rows in single rows when I fire SELECT query?

I want O/P like
101 abc CA USA 102 xyz PH UK 103 pqr WDC EU
Any help kindly appreciated. Thanks
How can I concatenate all the rows in single rows when I fire SELECT query?

I want O/P like
101 abc CA USA 102 xyz PH UK 103 pqr WDC EU
Any help kindly appreciated. Thanks
You'll need GROUP_CONCAT and CONCAT mysql functions and the query should look like this:
SELECT GROUP_CONCAT( CONCAT( id, ' ', name, ' ', city, ' ', state) SEPARATOR ' ')
FROM students
GROUP BY (1)
Or you can use CONCAT_WS instead:
CONCAT_WS(' ', id, name, city, state)