column names from table in mysql code example
Example 1: get the mysql table columns data type mysql
SHOW COLUMNS FROM mydb.mytable;
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%';