Skip to content

Instantly share code, notes, and snippets.

@ncremins
ncremins / gist:3812686
Created October 1, 2012 16:00
[MySQL] comma separated column names
SELECT GROUP_CONCAT(column_name ORDER BY ordinal_position)
FROM information_schema.columns
WHERE table_schema = 'DATABASE_HERE' AND table_name = 'TABLE_HERE'