Created
October 16, 2014 09:21
-
-
Save guillaumevoisin/ad93044a892993ed12b5 to your computer and use it in GitHub Desktop.
To get all tables with columns 'columnA' or 'ColumnB' in the database 'YourDatabase'
This file contains hidden or 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