DocTaur - intranet directory of reference manuals
Yo-store
books for webmasters

reference manuals search engine

MySQL Reference Manual - 4.0.20

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.8.6.3 Constraint ENUM and SET

In MySQL 4.x, ENUM is not a real constraint, but is a more efficient way to define columns that can contain only a given set of values. This is because of the same reasons NOT NULL is not honored. See section Constraint NOT NULL and DEFAULT Values.

If you insert an incorrect value into an ENUM column, it will be set to the reserved enumeration value 0, which will be displayed as an empty string in string context. See section The ENUM Type.

If you insert an incorrect value into a SET column, the incorrect value is ignored. For example, if the column can contain the values 'a', 'b', and 'c', an attempt to assign 'a,x,b,y' results in a value of 'a,b'. See section The SET Type.


This document was generated on July, 26 2004 using texi2html 1.70.