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. Oracle Materialized View DDL
    Are you a TOAD fanatic when it comes to “anything-Oracle”? If so, you probably realized that TOAD will not show...
  4. Copy Table Columns and Data
    As you may know, in Oracle the syntax from creating a table that is the same as another is: 1...
  5. 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,...
  6. 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...
  7. 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...
  8. 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...

Leave a Reply


Archives

Recent Comments

  • Kavitha Muniraj said: Hi, Could you please send a script which checks the status of forms and reports of oracle...
  • Siddharth said: Hey thanks a lot !! Have been lookin all over for this :) My PC may not be able t handle FlashBuilder...
  • Cyrex said: Hey man why I cant install Apex 4? is there anyone can help me.,?
  • sharanabasava said: ALTER TABLE [my_table_name] RENAME COLUMN [current_column_name] TO [new_column_name]; Sir,I...
  • Huub Vankan said: Thanks for this easy solution. Indeed strange that is does not work in the (x86) folder….

Calendar

July 2010
M T W T F S S
« Jun    
 1234
567891011
12131415161718
19202122232425
262728293031  

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