Find Tables with a Particular Column Name

SELECT DISTINCT TABLE_NAME 
 FROM INFORMATION_SCHEMA.COLUMNS
 WHERE COLUMN_NAME IN ('column_a','column_b')
 AND TABLE_SCHEMA='the_database_to_look_in';

Leave a Reply

Your email address will not be published. Required fields are marked *