- TABLE rename tips
you can copy a table using CREATE TABLE .. AS SELECT statement.
(but it DOESN'T COPY table key, index, column default)
After that, use DROP TABLE.
CREATE TABLE new_table AS SELECT * FROM old_table;
DROP TABLE old_table;
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_73a.htm#2062898
Especially Oracle 9i supports RENAME TO clause.
ALTER TABLE old_table RENAME TO new_table;
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_32a.htm#2086662
you can copy a table using CREATE TABLE .. AS SELECT statement.
(but it DOESN'T COPY table key, index, column default)
After that, use DROP TABLE.
CREATE TABLE new_table AS SELECT * FROM old_table;
DROP TABLE old_table;
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_73a.htm#2062898
Especially Oracle 9i supports RENAME TO clause.
ALTER TABLE old_table RENAME TO new_table;
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_32a.htm#2086662
'기술관련 > oracle' 카테고리의 다른 글
REF CURSOR (0) | 2006.03.22 |
---|---|
UniqueIndex VS PK (0) | 2006.02.20 |
프로세스 ID로 실행중인 SQL알아 보기 (0) | 2005.11.16 |
Oracle 10g DBPUMP (0) | 2005.03.13 |
오라클 DBA를 위한 유용한 5가지 유닉스 명령어 (0) | 2005.01.17 |