Skip to content

Instantly share code, notes, and snippets.

@iamshanto
Created April 2, 2020 11:41
Show Gist options
  • Save iamshanto/18b1df4e9fd713669b42e3125c70f375 to your computer and use it in GitHub Desktop.
Save iamshanto/18b1df4e9fd713669b42e3125c70f375 to your computer and use it in GitHub Desktop.
SELECT
tb.COLUMN_NAME AS 'Field Name',
tb.COLUMN_TYPE AS 'Data Type',
tb.IS_NULLABLE AS 'Allow Empty',
tb.EXTRA AS 'PK',
tb.COLUMN_COMMENT AS 'Field Description'
FROM
`INFORMATION_SCHEMA`.`COLUMNS` as tb
WHERE
TABLE_NAME = '__TABLE_NAME__'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment