MySQL: Find tables with a given column name
August 19, 2008 – 10:10 amTo get a list of tables in mysql which have a given column name (or regex of your choosing, etc.) use the following SQL:
select TABLE_NAME FROMĀ information_schema.COLUMNS WHERE TABLE_SCHEMA = ‘dbName’ and COLUMN_NAME like ‘%ColName%’;

Sorry, comments for this entry are closed at this time.