Statement:
alter table tableName rename column oldCName to newCName; -- 修改字段名
Example:
For example, we create a table now:
CREATE TABLE Student( id varchar2(32) primary key, name varchar2(8) not null, age number );
Now, we want to modify How to implement the field names of this table?
The statement is as follows:
alter table Student rename name to StuName;
What if you want to modify the data type of the field?
alter table Student modify (id varchar2(64));
Recommended tutorial: oracle tutorial
The above is the detailed content of How to write the statement to modify the field name in Oracle. For more information, please follow other related articles on the PHP Chinese website!