oracle常用sql

导入导出

exp system/123456@WWW file=d:\xxx.dmp
imp system/123456@WWW FROMUSER=system TOUSER=system file=d:\xxx.dmp

 

修改表结构

alter table  user.tb1 ADD(type number(1) default 0);
alter table  user.tb2  modify(intro varchar2(650))

 

 

重建索引

DROP SEQUENCE tb1.article_seq;
CREATE SEQUENCE tb1.article_seq; INCREMENT BY 1 START WITH 24 NOCYCLE NOCACHE;

 

修改varchar2为clob

ALTER TABLE user.tb1 ADD (duties1 CLOB);

UPDATE user.tb1 SET duties1=duties;

ALTER TABLE user.tb1 DROP COLUMN duties;

ALTER TABLE user.tb1 RENAME COLUMN duties1 TO duties;
 

 

 

 

你可能感兴趣的:(oracle,sql)