Created
September 18, 2012 06:27
-
-
Save davidwaterston/3741564 to your computer and use it in GitHub Desktop.
MySQL: Check if a column exists in a table
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 column_name | |
from information_schema.columns | |
where table_schema = '__database_name__' | |
and table_name = '__table_name__' | |
and column_name = '__column_name__' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment