TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Oracle

Oracle Rename Table Statement

Overview

Let’s learn the rename table statement in the Oracle database. This command is used to rename an existing table name to a new name in the database. The new name of the table should be different from the existing table names.

When we rename a table, Oracle invalidates all objects that depend on the old table and all the objects are transferred to the new table.

Rename

The syntax for the rename table SQL statement:

SQL> RENAME <existing_table_name> TO <new_table_name>;

Example

For example, we have an existing database table emp. We would like to rename the table name to the new name: employee

SQL> RENAME emp TO employee;

Oracle Rename Table Command

Example: Using existing table name

We cannot use the same name for the new table or any existing table name in the database. We get the following error:

ERROR at line 1:
ORA-00955: name is already used by an existing object

 

—

Oracle Database Tutorials on this website:

https://www.testingdocs.com/oracle-database-tutorials-for-beginners/

More information about Oracle Database:

https://www.oracle.com/database/

Related Posts

Oracle Databse 19c Download

Oracle /

Install Oracle 19c Database On Windows 10

ORA-01109 Database Not Open

Oracle /

Fix ORA-01109: database not open Error

Oracle SQL Update Statement

Oracle /

Oracle SQL Update Statement

Oracle SQL Insert Statement

Oracle /

Oracle SQL INSERT Statement

SELECT all rows and columns Oracle

Oracle /

Oracle SQL SELECT Statement

‹ Oracle SQL Data Types› Oracle SQL BETWEEN Operator with Examples

Recent Posts

  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Print Triangle Pattern Flowchart
  • RAPTOR Editions
  • Flowgorithm Conditional Breakpoint Statement
  • Flowgorithm Read Numbers from File Example
  • Search Text File Flowchart Example
  • Flowgorithm Turtle Graphics Symbols
  • Draw Circle using Flowgorithm Turtle

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version