Created
March 28, 2016 13:07
-
-
Save razvan-moldovan/3c95b228a1ce5b31fbc5 to your computer and use it in GitHub Desktop.
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
/** | |
* Search Mysql tables that contain particular fields | |
* | |
*/ | |
SELECT DISTINCT TABLE_NAME | |
FROM INFORMATION_SCHEMA.COLUMNS | |
WHERE COLUMN_NAME IN ('field', 'field2) | |
AND TABLE_SCHEMA='db_name'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment