oracle修改表字段

create table test1(
 id number,
 name varchar2(20)
)

--修改表字段类型
alter table test1 modify(
 id varchar2(30),
 name char(10) default '111'
)

--追加字段
alter table test1 add(
 id number primary key
)

--修改列名
alter table test1 rename column id to id1

--删除字段
alter table test1 drop column id1

猜你喜欢

转载自www.cnblogs.com/niwotaxuexiba/p/9726974.html