Skip to content

Instantly share code, notes, and snippets.

@VvanGemert
Last active June 23, 2017 09:53
Show Gist options
  • Save VvanGemert/6b1a3eadca38a7249c31c92ea7b72679 to your computer and use it in GitHub Desktop.
Save VvanGemert/6b1a3eadca38a7249c31c92ea7b72679 to your computer and use it in GitHub Desktop.
Identify column names equal to the table name
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