RENAME TABLE

Function

Renames a specified table.

Precautions

RENAME TABLE has the same function as the following command:

ALTER TABLE table_name RENAME to new_table_name

Syntax

RENAME TABLE
{[schema.]table_name TO new_table_name} [, ...];

Parameter Description

  • schema

    Specifies the schema name.

  • table_name

    Specifies the name of the table to be modified.

  • new_table_name

    Specifies the new table name.

Examples

Rename a table:

RENAME TABLE customer_address TO new_customer_address;