Last active
June 15, 2017 16:10
-
-
Save geoff-maddock/a141b62d77c0ef991894fa829570fa78 to your computer and use it in GitHub Desktop.
How to find all columns of a specified data type in MySQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE, COLUMN_TYPE, COLUMN_COMMENT, ORDINAL_POSITION FROM information_schema.columns WHERE table_schema = 'dbname' AND DATA_TYPE = 'enum' ORDER BY TABLE_NAME, ORDINAL_POSITION; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment