日期:2014-05-16 浏览次数:20829 次
create table tb_test( id bigint, filed_test enum('aa','bb') DEFAULT NULL); alter table tb_test modify filed_test enum('aa','bb','cc') DEFAULT NULL;
------解决方案--------------------
mysql> create table tb_test( -> id bigint, -> filed_test enum('aa','bb') DEFAULT NULL -> ); Query OK, 0 rows affected (0.13 sec) mysql> alter table tb_test modify filed_test enum('aa','bb','cc') DEFAULT NULL; Query OK, 0 rows affected (0.11 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> show create table tb_test; +---------+--------------------------------- -----------------------------------------+ | Table | Create Table | +---------+--------------------------------- -----------------------------------------+ | tb_test | CREATE TABLE `tb_test` ( `id` bigint(20) DEFAULT NULL, `filed_test` enum('aa','bb','cc') DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 | +---------+--------------------------------- -----------------------------------------+ 1 row in set (0.00 sec) mysql>