Skip to content

Instantly share code, notes, and snippets.

@ricardoalcocer
Created February 26, 2020 17:47
Show Gist options
  • Save ricardoalcocer/87d7b2c795fa9be31a1ee0fa626fc043 to your computer and use it in GitHub Desktop.
Save ricardoalcocer/87d7b2c795fa9be31a1ee0fa626fc043 to your computer and use it in GitHub Desktop.
MySQL get column names
SELECT `COLUMN_NAME`
FROM `INFORMATION_SCHEMA`.`COLUMNS`
WHERE `TABLE_SCHEMA`='db_name'
AND `TABLE_NAME`='table_name';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment