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.


Discover more from Radu Pârvu

Subscribe to get the latest posts sent to your email.

,

Leave a Reply

Discover more from Radu Pârvu

Subscribe now to keep reading and get access to the full archive.

Continue reading

Discover more from Radu Pârvu

Subscribe now to keep reading and get access to the full archive.

Continue reading