如何用mysql更改表的字段名。

新建了个表tv_play,如图:
图片说明
请问该如何把表的shit字段改为a_piece_of_shit?

 语法:alter table 表名 change column 旧字段名 新字段名 [约束条件];
 示例:
 alter table tv_play change column shit  a_piece_of_shit;
 如果字段有数据,最好新建a_piece_of_shit字段,然后把shit字段信息更新到a_piece_of_shit中,再删除shit字段

a_piece_of_shit 这个用词真是太有水平了,一点点就好

alter table tablename change old_field_name new_field_name old_type;

在MySQL数据库修改字段名方法:

1、语句:alter table student change physics physisc char(10) not null。
2、其中char(10) not null是你physisc字段的create_definition。