Skip to content

Instantly share code, notes, and snippets.

@pinge
Created December 8, 2014 17:23
Show Gist options
  • Select an option

  • Save pinge/9b86c369239cbdf248c4 to your computer and use it in GitHub Desktop.

Select an option

Save pinge/9b86c369239cbdf248c4 to your computer and use it in GitHub Desktop.
mysql
sorting table columns by column name
SELECT c.column_name
FROM INFORMATION_SCHEMA.COLUMNS c
WHERE c.table_name = 'some_table'
ORDER BY c.column_name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment