Skip to content

Instantly share code, notes, and snippets.

@thebouv
Created January 31, 2014 20:37
Show Gist options
  • Save thebouv/8742647 to your computer and use it in GitHub Desktop.
Save thebouv/8742647 to your computer and use it in GitHub Desktop.
Return list of column names as a commas separated list
SELECT GROUP_CONCAT( COLUMN_NAME )
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'my_table';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment