How to search a column name from a MySQL database?
Try this:
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME IN ('columnA','ColumnB')
AND TABLE_SCHEMA='YourDatabase';
Retrieve it from INFORMATION_SCHEMA COLUMNS Table
Query
select table_name, column_name
from information_schema.columns
where column_name like '%search_keyword%'; -- change search_keyword accordingly
Or if you want to search for exact column name then no need of LIKE
.
where column_name = 'column_name_to_be_find';