Strange error when renaming a table

ORA-14047: ALTER TABLE INDEX RENAME may not be combined with other operations

When we try to rename a table or index name in Oracle, we use a simple command as following

ALTER TABLE``[SCHEMA_NAME]``.``[OLD_TABLE_NAME]``RENAME TO``[NEW_TABLE_NAME]``;

If we put into schema names to this command, we can encounter ORA-14047 error.
This error raises when we put schema name in front of the last_table_name.

ALTER TABLE SCOTT.TABLE_NAME RENAME TO SCOTT.TABLE_NAME2;
ORA-14047: ALTER TABLE INDEX RENAME may not be combined with other operations

But, if we use:

ALTER TABLE SCOTT.TABLE_NAME RENAME TO TABLE_NAME2;
Table altered.

it will work!

It is same with Index renaming.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: