语句:
alter table tableName rename column oldCName to newCName; -- 修改字段名
举例说明:
比如我们现在创建一张表:
CREATE TABLE Student( id varchar2(32) primary key, name varchar2(8) not null, age number );
现在,我们要修改该表的字段名,该如何实现呢?
语句如下:
alter table Student rename name to StuName;
如果要修改字段的数据类型呢?
alter table Student modify (id varchar2(64));
推荐教程:oracle教程
以上就是oracle修改字段名的语句怎么写的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号