wahsaga: ENUM (mysql)

Beitrag lesen

hi,

Scheinbar gibt es außer den ENUM-Werten aber noch die Möglichkeit, die Spalte mit "gar keinen"-Werten zu füllen.

Beispiel:
UPDATE tabelle SET nummer = 'K' WHERE...

...führt zu dem Ergebnis, dass nummer keinen Wert hat, also auch keinen default.

Was mach ich falsch?

Hm - du hast vielleicht die Doku nicht gelesen?

http://dev.mysql.com/doc/refman/4.1/en/enum.html
"If you insert an invalid value into an ENUM (that is, a string not present in the list of allowed values), the empty string is inserted instead as a special error value. This string can be distinguished from a “normal” empty string by the fact that this string has the numerical value 0. More about this later."

gruß,
wahsaga

--
/voodoo.css:
#GeorgeWBush { position:absolute; bottom:-6ft; }