增加字段语法:alter table 表名 add (字段名 字段类型 默认值 是否为空);
例:
alter table student add(score number(3,1) default 0 not null);
修改字段的语法:alter table 表名 modify (字段名 字段类型 默认值 是否为空);
例:
alter table student modify(score number(3,2));
删除字段语法:alter table 表名 drop column 字段名;
例:
alter table student drop column score;
字段重命名:alter table 表名 rename column 列名 to 新列名;
例:
alter table student rename column score to score1;
表重命名:alter table 表名 rename to 新表名;
例:
alter table student rename to student1;
转载于:https://www.cnblogs.com/greatdynasty/p/10905783.html
最后
以上就是紧张摩托最近收集整理的关于oracle 表字段新增、修改、删除、重命名以及表重命名的全部内容,更多相关oracle内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复