Monday, February 28, 2011

Renaming an Oracle Table

Use below query to rename an Oracle table..


ALTER TABLE table_name RENAME TO new_table_name;


But the below query will gives an error.

alter table MY.TEST rename to MY.TEST_BK;

To avoid it use new table name without metioning the Schema name as below.

alter table MY.TEST rename to TEST_BK;

No comments:

Post a Comment