RENAME (Used for renaming tables,synonyms and views)

Oracle provides a very useful command rename to change the name of the object,
this command should be used with lot of understanding as to which other objects and privilleges it might affect.

The syntax for calling rename is :
RENAME old to New
Please note that we do not specify the object type to be renamed for example
we don't say RENAME TABLE my_tbl TO my_tbl_1 

Rename can be used to rename tables, synonyms and views.

If a objet is renamed then all procedures , functions accessing the underlying
object are made invalid and when they are called upon the next time oracle
automatically recompiles them if by now the object reference in the stored objects is corrected the procedure will function properly if otherwise oracle will report an error.

rename my_tbl to my_tbl_1;
rename my_syn_1 to my_syn_1;
rename my_view to my_view_1 ;

Hosted by www.Geocities.ws

1