RENAME TABLE

The RENAME TABLE statement allows you to rename an existing table in any schema (except the schema SYS).

To rename a table, you must either be the database owner or the table owner.

Syntax

RENAME TABLE table-Name TO new-Table-Name

table-Name

The name of the table to be renamed.

new-Table-Name

The new name for the table.

Usage Notes

Attempting to rename a table generates an error if:

  • there is a view or a foreign key that references the table
  • there are any check constraints or triggers on the table

Example

splice> RENAME TABLE MorePlayers to PlayersTest;
0 rows inserted/updated/deleted

See the  ALTER TABLE statement for more information.