守望黎明号txt无防盗:在MySQL数据库,如何修改字段名?

来源:百度文库 编辑:高考问答 时间:2024/04/28 13:37:53
我的MySQL数据库有一个表,student,表中一个字段名physisc 被误打为physics,表中已有大量数据,不能删除重新建表,请问如何修改表中的字段名?我记得是用alter table 修改,但我不会用具体使用,请高人指点一下!多谢谢了!

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

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

alter table student change physics physisc char(10) not null;
其中char(10) not null是你physisc字段的create_definition.

纠结了, 难道physics写得不对?