rename table


Renaming table can be surprising, if you tried both rename and alter table for renaming.

If you issue below statement, you will get following error:

alter table schema1.T1 rename to schema1.T2;
ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations
and if you issue below statement, you will get another surprising error:

rename schema1.T1 to schema1.T2;
ORA-01765: specifying table’s owner name is not allowed
The last resort and true one is issueing:

alter table schema1.T1 rename to T2;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: