20 表结构的增删改

修改表
在命令窗口查看表结构 desc 表名
添加新字段 alter table 表名 add 字段名 类型
alter table student add phone number(11)
修改字段类型 alter table 表名 modify 字段名 类型
alter table student modify sname varchar2(200)

修改字段名 ALTER TABLE 表名 CHANGE 旧字段名 新字段名 新数据类型;

删除字段 alter table 表名 drop column 字段名
alter table student drop column phone
修改表名 rename 表名 to 新的表名
rename student to stu
rename stu to student
删除表 drop table 表名
drop table student

原文地址:https://www.cnblogs.com/Scorpicat/p/12306761.html