Skip to content

Instantly share code, notes, and snippets.

@dpdexter
Created February 20, 2015 20:08
Show Gist options
  • Save dpdexter/164803d46d7b495f87c2 to your computer and use it in GitHub Desktop.
Save dpdexter/164803d46d7b495f87c2 to your computer and use it in GitHub Desktop.
show table field names
SELECT `COLUMN_NAME`
FROM `INFORMATION_SCHEMA`.`COLUMNS`
WHERE `TABLE_SCHEMA`='yourdbname'
AND `TABLE_NAME`='yourtablename';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment