tags:

views:

21

answers:

1

I have a table STUDENT with a column NAMES.that column contains 10 rows ,

in SQL when i write

SELECT @variable= NAMES FROM STUDENT ;

it wiil display all 10 rows data in a single row ;

How to achive this in MySql? please help me

+1  A: 
SELECT GROUP_CONCAT(variable SEPARATOR ' ')
FROM student
GROUP BY 1
JochenJung