Posted By

lancemonotone on 02/22/10


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

dantreacy
virendrakryadav
Priestd09


Find all tables in MySQL database containing specific column names


 / Published in: MySQL
 

URL: http://stackoverflow.com/questions/193780/how-to-find-all-the-tables-in-mysql-with-specific-column-names-in-them

  1. SELECT DISTINCT TABLE_NAME
  2. FROM INFORMATION_SCHEMA.COLUMNS
  3. WHERE COLUMN_NAME IN ('columnA','ColumnB')
  4. AND TABLE_SCHEMA='YourDatabase';

Report this snippet  

You need to login to post a comment.