oracle表的创建、字段的操作

来源:互联网 发布:java桥接模式应用场景 编辑:程序博客网 时间:2024/05/16 11:43

表操作:

创建:create table 表名(字段名 字段类型,

字段名 字段类型,

字段名 字段类型,

字段名 字段类型,

字段名 字段类型,

字段名 字段类型);

查看表结构:desc 表名;

列操作:

增加列:ALTER TABLE tablename  ADD  columnname datatype;

alter table stu add phonenumber number(12);

修改列:ALTER TABLE table  MODIFY  columnname datatype;

alter table stu modify phonenumber number(14);

删除列:ALTER TABLE table DROP column;

alter table stu drop  column phonenumber;

查询:desc stu;

0 0