本文摘自PHP中文网,作者hzc,侵删。

oracle修改表字段名的方法是:
首先bai方法是使用RENAME关键字:
修改字段名:
1 | alter table 表名 rename column 现列zhi名 to 新列名;
|
修改表名:
1 | alter table 表名 rename to 新表dao名
|
增加字段语法:
1 | alter table tablename add ( column datatype [ default value][ null / not null ],….);
|
说明:
1 | alter table 表名 add (字段名 字段类型 默认值 是否为空);
|
例:
1 | alter table sf_users add (HeadPIC blob);
|
例:
1 | alter table sf_users add (userName varchar2(30) default '空' not null );
|
修改字段的语法:
1 | alter table tablename modify ( column datatype [ default value][ null / not null ],….);
|
说明:
1 | alter table 表名 modify (字段名 字段类型 默认值 是否为空);
|
例:
1 | alter table sf_InvoiceApply modify (BILLCODE number(4));
|
删除字段的语法:
1 | alter table tablename drop ( column );
|
说明:
1 | alter table 表名 drop column 字段名;
|
例:
1 | alter table sf_users drop column HeadPIC;
|
字段的重命名:
阅读剩余部分
相关阅读 >>
oracle 11gr2 win64安装配置教程另附基本操作
oracle忘记用户名和密码怎么办?
oracle 存储过程发送邮件实例学习
oracle 模糊查询及like用法
oracle 性能优化建议小结
基于oracle闪回详解(必看篇)
优化oracle停机时间及数据库恢复
oracle求字符串长度函数length()和hengthb()简介
oracle securefile的功能第14页
vmware 虚拟机centos7安装oracle数据库的教程图解
更多相关阅读请进入《oracle》频道 >>
机械工业出版社
本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。
转载请注明出处:木庄网络博客 » oracle如何修改表字段名