修改列定义
ALTER TABLE tbl_name MODIFY [COLUMN] col_name col_definition [FIRST|AFTER col_name]
修改字段位置

修改列定义

修改列名称(列定义)
ALTER TABLE tbl_name CHANGE [COLUMN] old_col_name new_col_name_column_definition [FIRST|AFTER col_name]

数据表更名
方法1:ALTER TABLE tbl_name RENAME [TO|AS] new_tbl_name
方法2:RENAME TABLE tbl_name TO new _tbl_name

网友评论