数据表更名:
方法1:ALTER TABLE tbl_name RENAME [TO|AS] new_tbl_name
方法2:RENAME TABLE tbl_name TO new_tbl_name [,tbl_name2 TO new_tbl_name]...
方法1:ALTER TABLE tbl_name RENAME [TO|AS] new_tbl_name
方法2:RENAME TABLE tbl_name TO new_tbl_name [,tbl_name2 TO new_tbl_name]...
2017-09-13
修改列定义:ALTER TABLE tbl_name MODIFY [COLUMN] col_name column_definition [FIRST|AFTER col_name ]
修改列名称:ALTER TABLE tbl_name CHANGE [COLUMN] old_col_name new_col_name column_definition [FIRST|AFTER col_name
修改列名称:ALTER TABLE tbl_name CHANGE [COLUMN] old_col_name new_col_name column_definition [FIRST|AFTER col_name
2017-09-13
删除主键约束:ALTER TABLE tbl_name DROP PRIMARY KEY
删除唯一约束:ALTER TABLE tbl_name DROP {INDEX|KEY} index_name
删除外键约束:ALTER TABLE tbl_name DROP FOREIGN KEY fk_symbol
删除唯一约束:ALTER TABLE tbl_name DROP {INDEX|KEY} index_name
删除外键约束:ALTER TABLE tbl_name DROP FOREIGN KEY fk_symbol
2017-09-13