oracle中的修改表结构

1.更改表名

rename 原表名 to 新表名
rename stu to student;

2.更改列名

alter table 表名 rename column 原列名 to 新列名;
alter table stu rename column sex to gender;

3.删除一列

alter table 表名 drop column 列名;
alter table stu drop column gender;

4.增加一列

alter table 表名 add  列名 列的类型;
alter table employee add  sex char(2);

 5.修改列的类型

alter table 表名 modify 列名 列的类型;
alter
table stu modify sex varchar2(4);
原文地址:https://www.cnblogs.com/QQ1171492144/p/10649148.html