Skip to content

Instantly share code, notes, and snippets.

@jfriv
Created March 6, 2018 02:54
Show Gist options
  • Save jfriv/73593d8ac09821362eabfc7a6c8f0d2c to your computer and use it in GitHub Desktop.
Save jfriv/73593d8ac09821362eabfc7a6c8f0d2c to your computer and use it in GitHub Desktop.
MySQL select all column names for a table
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'mydatabase' AND TABLE_NAME = 'mytable'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment