RENAME Statement

Rename a table, view, sequence or private synonym.

Syntax:

   RENAME old TO new

To rename table columns:

CREATE TABLE tmp AS SELECT MyColOld MyColNew, col2, col3 FROM MY_TABLE;
DROP TABLE MY_TABLE;
RENAME tmp TO MY_TABLE;

You can also
ALTER TABLE MODIFY COLUMN…
ALTER TABLE DROP COLUMN…
ALTER TABLE SET UNUSED COLUMN…

"A clever man commits no minor blunders" ~ Goethe (1749-1832)

Related Commands:

TABLE - CREATE TABLE
TABLE - ALTER TABLE
INSERT
SELECT

TRUNCATE

UPDATE

Related Views:

 DBA_SNAPSHOTS        ALL_SNAPSHOTS        USER_SNAPSHOTS
 DBA_ALL_TABLES       ALL_ALL_TABLES       USER_ALL_TABLES
 DBA_TABLES           ALL_TABLES           USER_TABLES         TAB
 DBA_VIEWS            ALL_VIEWS            USER_VIEWS
 DICTIONARY
 DICT_COLUMNS


© Copyright SS64.com 1999-2013
Some rights reserved