Created
May 30, 2016 10:41
-
-
Save stephenhardy/a89d672fd9f23b0787d9aebff045940d to your computer and use it in GitHub Desktop.
Find all mysql database tables with specific column names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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