ITPub博客

首页 > 数据库 > Oracle > Alter table for ORACLE

Alter table for ORACLE

原创 Oracle 作者:ningzi82 时间:2010-08-06 13:43:43 0 删除 编辑

1.create table
create table test (a varchar2(10),b number(2));

2.rename table
alter table test rename to txt;
rename txt to test;

3.add column
alter table test add c varchar2(10);
alter table test add (c varchar2(10),d number(5));

4.rename column
alter table test rename column a to b;

5.alter column
alter table test modify a varchar(10);
alter table test modify b varchar(10);

5.drop column
alter table test drop column a;[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/789833/viewspace-1036286/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: Hit Ratio For ORACLE
请登录后发表评论 登录
全部评论

注册时间:2008-12-16

  • 博文量
    130
  • 访问量
    358891