ENUM MySQL.
ENUM , , .
() NULL :
- ENUM ( , ), . , 0. ;
- ENUM NULL, NULL , NULL. ENUM NOT NULL, .
:
- , 1 ( 0!);
- 0. , SELECT, , ENUM :
mysql> SELECT * FROM tbl_name WHERE enum_col = 0;
- NULL NULL.
, , ENUM (one, two, three), , (. . 5.4). .
5.4. enum
NULL | NULL |
0 | |
one | 1 |
two | 2 |
three | 3 |
65535 .
, ENUM. , , , , . , , ǻ, , .
ENUM , . , ENUM :
mysql> SELECT enum_col+0 FROM tbl_name;
To , ENUM (, , ), . : 1, 2 3.
ENUM , . , ENUM . , b ENUM(a,b), ܻ ENUM(b, ). , NULL .
ENUM, SHOW COLUMNS FROM table_name LIKE enum_column_name ENUM .