MySQL has an ENUM feature, but I strongly advise you not to use it. Put the possible values in a separate table make use a foreign key to link it to the main table (if your version supports such a thing...). This is proper normalization and allows you to add or delete values without modifying a fragile datatype.
http://dev.mysql.com/doc/refman/5.0/en/enum.html On Dec 7, 2005, at 9:24 AM, Robert Citek wrote: > > How does one add a value to a field that is of type "set"? > > As a hypothetical example, let's say I have a table that has a field > of type set for which valid values are "dog", "cat", "rat". Also, > one of the rows already contains the value "dog" so that a select > shows only "dog". I'd now like to update that field to include "cat" > so that a select show "dog,cat". How do I do that? > > I've googled and searched the MySQL manual but haven't found a clear > answer. My guess is that I have to do an update with the value being > the additional value concatenated on to the existing value. But I > haven't found an example, yet. |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|- AgentM [EMAIL PROTECTED] |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|- _______________________________________________ CWE-LUG mailing list [email protected] http://www.cwelug.org/ http://www.cwelug.org/archives/ http://www.cwelug.org/mailinglist/
