Skip to content

Instantly share code, notes, and snippets.

@nateflink
Created December 7, 2018 20:16
Show Gist options
  • Save nateflink/36963c00a6f550b767d2f3d7a63c5c48 to your computer and use it in GitHub Desktop.
Save nateflink/36963c00a6f550b767d2f3d7a63c5c48 to your computer and use it in GitHub Desktop.
SELECT TABLE_NAME 'Table', COLUMN_NAME 'Field', COLUMN_TYPE 'Type', IS_NULLABLE 'Null',
COLUMN_KEY 'Key', COLUMN_DEFAULT 'Default', EXTRA 'Extra' FROM information_schema.columns WHERE
table_schema = 'yourdb' ORDER BY TABLE_NAME;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment