Skip to content

Instantly share code, notes, and snippets.

@madeingnecca
Created March 14, 2013 11:34
Show Gist options
  • Save madeingnecca/5160671 to your computer and use it in GitHub Desktop.
Save madeingnecca/5160671 to your computer and use it in GitHub Desktop.
MYSQL - list columns of a table
SELECT column_name,column_type
FROM information_schema.columns
WHERE table_schema = DATABASE()
AND table_name='table'
ORDER BY ordinal_position;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment