Skip to content

Instantly share code, notes, and snippets.

@hooopo
Created April 13, 2020 09:21
Show Gist options
  • Save hooopo/8b3677eba803abfeefe7f3853b47ae76 to your computer and use it in GitHub Desktop.
Save hooopo/8b3677eba803abfeefe7f3853b47ae76 to your computer and use it in GitHub Desktop.
SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT FROM INFORMATION_SCHEMA.COLUMNS limit 10;
+----------------------+-----------+-------------+----------------+
| COLUMN_NAME | DATA_TYPE | IS_NULLABLE | COLUMN_DEFAULT |
+----------------------+-----------+-------------+----------------+
| CHARACTER_SET_NAME | varchar | NO | |
| DEFAULT_COLLATE_NAME | varchar | NO | |
| DESCRIPTION | varchar | NO | |
| MAXLEN | bigint | NO | 0 |
| COLLATION_NAME | varchar | NO | |
| CHARACTER_SET_NAME | varchar | NO | |
| ID | bigint | NO | 0 |
| IS_DEFAULT | varchar | NO | |
| IS_COMPILED | varchar | NO | |
| SORTLEN | bigint | NO | 0 |
+----------------------+-----------+-------------+----------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment