日期:2014-05-16  浏览次数:20706 次

修改表结构流程
--STEP 1
create table TABLE_T as select * from TABLE;

--STEP 2
DROP TABLE TABLE CASCADE CONSTRAINTS
;

CREATE TABLE TABLE
(
)
;

ALTER TABLE TABLE ADD CONSTRAINT PK_TABLE
PRIMARY KEY (PK_COLUMN)
;

GRANT DELETE, INSERT, SELECT, UPDATE ON     TABLE              TO TEMP_USER;

INSERT INTO TABLE(
)SELECT

FROM TABLE_T
COMMIT;

--STEP 3
drop table TABLE_T;