Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

alter table rename dynamically

user650888Jan 30 2012 — edited Jan 30 2012
CREATE TABLE GTEST_OR(X NUMBER)

I am trying to dynamically rename this table, I get ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations

can we not alter table dynamicallly and apped new table name with current time ?

begin
execute immediate 'ALTER TABLE GTEST_OR
RENAME TO DUP||to_char(sysdate,''YYYYMMDDHH24MISS'')';

end;
/
This post has been answered by BluShadow on Jan 30 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2012
Added on Jan 30 2012
8 comments
2,480 views