Oracle Rename Table - Example Syntax and Dependencies

By M&S Consulting (Ashok) on May 16th, 2009
Filed Under Technical Tips // Tags:

Renaming a table in Oracle is simple. Following is the generic Oracle table rename syntax:

1
ALTER TABLE current_table_name RENAME TO new_table_name;

In practice, you might realize you left off a prefix that you are using as a naming standard. Changing the table name can be accomplished with the following example syntax:

1
ALTER TABLE employee RENAME TO dw_employee;

If the table is already in use, I recommend that you review custom code, Oracle packages, stored procedures, and any other references to the table. You can use tools like TOAD to view dependencies on the table prior to renaming it. Below is a screenshot within TOAD of the “Used By” tab that can be used when your table is selected in the schema browser:

used_by

Bookmark and Share

Related Information:

  1. Oracle Rename Column - alter table, rename column Example SQL Syntax

    Following is simple example syntax for renaming a column to an Oracle table using "alter table" SQL:

    ALTER...
  2. alter table, add column - Oracle Example Syntax Following is simple example syntax for adding a column to an Oracle table using “alter table” SQL: 1 2 ALTER...
  3. TOAD for Oracle 9 or TOAD 10 - 64-bit Windows - ORA-12154: could not resolve the connect identifier specified or ORA-6413: connection not open I recently downloaded the new 10.x version of TOAD and could not connect to my databases. Still running TOAD 9.x,...
  4. Oracle SUBSTR with INTSR Function - SQL Syntax Examples Oracle SUBSTR and INSTR SQL functions are typically used together in practice for parsing a string. Following are...
  5. Oracle SUBSTR Function - SQL Syntax Examples The Oracle SUBSTR SQL Function is very common, and many times misused. Below shows the SUBSTR function along with the...
  6. Oracle TO_DATE Function - SQL Syntax Examples The Oracle TO_DATE SQL function is used to convert a TEXT or NTEXT representation of a date into an Oracle...
  7. Oracle INSTR Function - SQL Syntax Examples The Oracle INSTR SQL function is popular and performs materially the same operation as instr functions in many other programming...
  8. MySQL and SQL Server - Oracle CONNECT BY PRIOR for Recursive, Hierarchical Data Recursive queries are something I have used many, many times over the years to build dynamic, n-tiered hierarchies. Oracle’s CONNECT...

Leave a Reply


Archives

Recent Comments

  • ashok.aggarwal said: Thank you for your comment, Stuart. I’m glad this helped you.
  • Stuart said: I’d really like to thank you for your post. It was really that simple.
  • ashok.aggarwal said: Your specific question is not very clear, however, in the context of implementing a LIKE...
  • Jonas said: Finally in print that a user is required to show the email option. Thanks.
  • syut.sa said: Thank you.

Calendar

March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  

Featured Testimonial

"M&S has taken 'partnership' to a new level. They are not only a deeply skilled service provider, the M&S team is actually a mission critical component to our operations, taking on new initiatives as well as maintaining custom, open source, and COTS solutions."

CEO, MedPivot

Free SQL Service