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

c# - IMAP GMAIL getting folder list problem -

CUDA shared memory -