Alter table for ORACLE

ningzi82發表於2010-08-06

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部落格 ” ,連結:http://blog.itpub.net/789833/viewspace-1036286/,如需轉載,請註明出處,否則將追究法律責任。

相關文章