Rename Command fails with ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
Error Description
Table rename command fails with following error.
SQL> alter table scott.test rename to scott.tst;
alter table scott.test rename to scott.tst
                                          *
ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations
Solution Description


The table rename syntax is
Alter table <table name> rename to <new table name>;
Or
Rename <table name> to < new table name >;

But if you qualify the new table name with the schema, you will get the above error. You should use the following syntaxes. See some examples

SQL> create table test (name varchar2(10));

Table created.

SQL>  alter table scott.test rename to tst;

Table altered.

OR

SQL> rename test to tst;

Table renamed.

OR

SQL> alter table test  rename to tst;

Table altered.

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer