Skip to content

Instantly share code, notes, and snippets.

@stephenhardy
Created May 30, 2016 10:41
Find all mysql database tables with specific column names
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME IN ('columnA','ColumnB')
AND TABLE_SCHEMA='YourDatabase';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment