Search database if column name/field name exists in a table in mySQL
database, mysql, sql
Solution
use INFORMATION_SCHEMA database and its tables.
eg :
SELECT *
FROM information_schema.columns
WHERE table_schema = 'MY_DATABASE'
AND column_name IN ( 'MY_COLUMN_NAME' );
Problem
Is there a way to search the database if a column name / field name exists in a table in mysql?