MySQL Enum correct use? -


`gender` enum('female','male','rather not say','alien') not null default 'rather not say', 

is correct way use enum?

yes is. more info here http://dev.mysql.com/doc/refman/5.0/en/enum.html

your use of enum takes less storage space , faster if stored actual strings since mysql internally represents each choice number. i.e. female = 0, male = 1, etc.


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -