RENAME TABLE

RENAME TABLE — rename a table

Syntax

RENAME TABLE [schema.]old_tablename TO [schema.]new_tablename 

Description

Use RENAME TABLE to rename an existing table.

Parameters

Note: If provided, schema must be the same for old_tablename and new_tablename. Tables cannot be moved between schemas.

Example

RENAME TABLE table1 TO table2;