US State list SET or ENUM?
Posted by: Hugh Messenger
Date: May 17, 2006 06:12PM

I'm designing my first schema for MySQL, which includes an "address" table. I got to the two letter "state" column, and decided that this is such a common requirement that there must be some standard SET or ENUM for the 50 States. But after much searching, I've come up empty.

Any suggestions on how I should define this? Just make it a CHAR(2), or VARCHAR(2) and deal with enumerating and checking the state code in the perl/PHP front end, or create my own SET in the schema?

Please excuse my ignorance, but we all have to start somewhere!

-- hugh

Options: ReplyQuote


Subject
Written By
Posted
US State list SET or ENUM?
May 17, 2006 06:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.