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

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -