List:General Discussion« Previous MessageNext Message »
From:Jerry Schwartz Date:August 22 2006 7:00pm
Subject:RE: Finding field in all tables
View as plain text  
:<)

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.

Thanks.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341


-----Original Message-----
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



>>>-----Original Message-----
>>>From: Jerry Schwartz [mailto:jschwartz@stripped]
>>>Sent: Tuesday, August 22, 2006 2:22 PM
>>>To: mysql@stripped
>>>Subject: Finding field in all tables
>>>
>>>Is there any way to find a column name (or, better yet, a
>>>partial column
>>>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.
>>>
>>>
>>>Regards,
>>>
>>>Jerry Schwartz
>>>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
>>>To unsubscribe:
>>>http://lists.mysql.com/mysql?unsub=1
>>>
>>>



Thread
Finding field in all tablesJerry Schwartz22 Aug
  • RE: Finding field in all tablesGeorge Law22 Aug
    • RE: Finding field in all tablesJerry Schwartz22 Aug
  • Re: Finding field in all tablesPeter Brawley22 Aug
    • RE: Finding field in all tablesJerry Schwartz22 Aug
      • Re: Finding field in all tablesPeter Brawley22 Aug
        • RE: Finding field in all tablesJerry Schwartz22 Aug
          • Re: Finding field in all tablesPeter Brawley22 Aug