mysql - SHOW FIELDS but with filter on field type? -


I have a MySQL database with several tables with many fields.

Is there a basic way to find only the fields of type TEXT

, I know that the language of such a script Like PHP, I just want to know if there is a move using the show Tables / Show field, I do not have any information about it.

For MySQL 5+, you must INFORMATION_SCHEMA :

  SELECT TABLE_NAME, COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS WHERE DATA_TYPE = 'TEXT';  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -