--二维表的维护
--添加新的字段:
--alter table 表名 add 字段名 类型
alter table student add sphone number(11)--在学生表中添加新的字段
--修改原有字段
--修改字段类型
--alter table 表名 modify 字段名 新的类型
alter table student modify sphone varchar2(11)
--修改字段名
--alter table 表名 rename column 字段名 to 新的字段名
alter table student rename column sphone to phone
--删除字段
--alter table 表名 drop column 字段名
alter table student drop column phone
--修改表名
--rename 原有表名 to 新的表名
rename student to student2
rename student2 to student
--删除表
--drop table 表名
drop table student
二维表的修改学习
最新推荐文章于 2024-10-13 09:05:52 发布