1755
1755
CREATE TABLE t1(a enum('a','b','c','d'));
1756
1756
INSERT INTO t1 VALUES (4),(1),(0),(3);
1757
1757
ERROR 01000: Data truncated for column 'a' at row 3
1758
INSERT INTO t1 VALUES (4),(1),(2),(3);
1760
1765
EXPLAIN SELECT a FROM t1 WHERE a=0;
1761
1766
id select_type table type possible_keys key key_len ref rows Extra
1763
1768
SELECT a FROM t1 WHERE a=0;
1765
1770
ALTER TABLE t1 ADD PRIMARY KEY (a);