Created
September 11, 2013 16:10
-
-
Save jbruni/6525859 to your computer and use it in GitHub Desktop.
Querying information_schema at MySQL to get all DEFAULT values assigned at a given database schema.
Right now I wanted this information to assign these values as default to the corresponding properties at my model classes...
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 `COLUMNS` WHERE (TABLE_SCHEMA = 'schema_name') AND (COLUMN_DEFAULT IS NOT NULL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment