alter table tbl_name modify field_name new_field_define
alter table tbl_name modify field_name new_field_define
使用alter table ... 重新定义该字段
看参考手册呀 7.8 ALTER TABLE句法 ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...]alter_specification: ADD [COLUMN] create_definition [FIRST | AFTER column_name ] or ADD INDEX [index_name] (index_col_name,...) or ADD PRIMARY KEY (index_col_name,...) or ADD UNIQUE [index_name] (index_col_name,...) or ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT} or CHANGE [COLUMN] old_col_name create_definition or MODIFY [COLUMN] create_definition or DROP [COLUMN] col_name or DROP PRIMARY KEY or DROP INDEX index_name or RENAME [AS] new_tbl_name or table_options够详细了吧比如用alter table tbl_name modify alter table tbl_name change来重新定义字段属性,或者用 alter table tbl_name drop index index_name
7.8 ALTER TABLE句法
ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...]alter_specification:
ADD [COLUMN] create_definition [FIRST | AFTER column_name ]
or ADD INDEX [index_name] (index_col_name,...)
or ADD PRIMARY KEY (index_col_name,...)
or ADD UNIQUE [index_name] (index_col_name,...)
or ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT}
or CHANGE [COLUMN] old_col_name create_definition
or MODIFY [COLUMN] create_definition
or DROP [COLUMN] col_name
or DROP PRIMARY KEY
or DROP INDEX index_name
or RENAME [AS] new_tbl_name
or table_options够详细了吧比如用alter table tbl_name modify
alter table tbl_name change来重新定义字段属性,或者用
alter table tbl_name drop index index_name