Last active
June 23, 2017 09:53
-
-
Save VvanGemert/6b1a3eadca38a7249c31c92ea7b72679 to your computer and use it in GitHub Desktop.
Identify column names equal to the table 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
SELECT * FROM information_schema.COLUMNS | |
WHERE TABLE_SCHEMA = 'table_name' | |
AND TABLE_NAME = COLUMN_NAME; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment