Archive for August, 2008

MySQL: Find tables with a given column name

Tuesday, August 19th, 2008

To 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%';