Created
October 1, 2012 16:00
-
-
Save ncremins/3812686 to your computer and use it in GitHub Desktop.
[MySQL] comma separated column names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT GROUP_CONCAT(column_name ORDER BY ordinal_position) | |
FROM information_schema.columns | |
WHERE table_schema = 'DATABASE_HERE' AND table_name = 'TABLE_HERE' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment