get fields of table mysql code example
Example 1: mysql show column data types
SELECT DATA_TYPE from INFORMATION_SCHEMA.COLUMNS where
table_schema = ’yourDatabaseName’ and table_name = ’yourTableName’.
Example 2: mysql to get column name in database
SELECT table_name, column_name from information_schema.columns WHERE column_name LIKE '%column_name_to_search%';