Rename table name in Oracle Syntax
We need to rename the old table with new name in Oracle with following syntax:
Syntax
ALTER TABLE table_name RENAME TO new_table_name;
Example
ALTER TABLE tran RENAME TO tran_new;
Note: You can login with the schema name inwhich you want to rename the table.
Suppose my table in SCOTT schema then i login with SCOTT schema and run the following SQL
sqlplus scott/tiger
ALTER TABLE scott.tran RENAME TO tran_new;
It will give the error if you want to execute it like
ALTER TABLE scott.tiger RENAME to scott.tran_new;
Use it as:
sqlplus scott/tiger
ALTER TABLE scott.tran RENAME TO tran_new;