Monday, January 28, 2013

Get all rows for paticular column in one column.

For getting records returned by a sql query in one column  comma seperated we can use 
SELECT GROUP_CONCAT(columnname) AS columnname FROM tablename WHERE condition .
This query will return all query results for paticular column in one column comma seperated.

No comments :

Post a Comment