I went a similar way, actually. I pushed the output of a SHOW TABLES into a
text file, sucked it into Excel, and used a formula to make the necessary
SHOW COLUMNS FROM `tbl_name` LIKE "expression". It took me a minute or two
to figure out I needed the back-ticks - the very first table is named ORDER,
and I thought there was something wrong with my plan.
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
From: George Law [mailto:glaw@stripped]
Sent: Tuesday, August 22, 2006 2:41 PM
To: Jerry Schwartz; mysql@stripped
Subject: RE: Finding field in all tables
Love it when that happens :)
Fastest way I can think of is dumping out the structure of the database
with mysqldump -d > database.sql
and then searching the output to see where those columns appear
>>>From: Jerry Schwartz [mailto:jschwartz@stripped]
>>>Sent: Tuesday, August 22, 2006 2:22 PM
>>>Subject: Finding field in all tables
>>>Is there any way to find a column name (or, better yet, a
>>>name) in all tables within a data base?
>>>I inherited a complex and totally undocumented data base,
>>>and need to find
>>>out (for example) which tables have a column name like xxx_exported.
>>>Global Information Incorporated
>>>195 Farmington Ave.
>>>Farmington, CT 06032
>>>860.674.8796 / FAX: 860.674.8341
>>>MySQL General Mailing List
>>>For list archives: http://lists.mysql.com/mysql