Created
September 1, 2011 06:12
-
-
Save unbracketed/1185569 to your computer and use it in GitHub Desktop.
mysql find all uses of column name
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
--http://stackoverflow.com/questions/193780/how-to-find-all-the-tables-in-mysql-with-specific-column-names-in-them | |
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