8. SQL Statements : RENAME TABLE : Syntax
 
Share this page                  
Syntax
The RENAME TABLE statement has the following format:
[EXEC SQL] RENAME TABLE [schema.]table_name TO new_table_name
Indexes, grants, comments, synonyms, sequences, partitions, and extension tables are automatically transferred to the newly renamed table or column.
The rename operation will fail with an error if any views, procedures, referential or check constraints, rules, integrities, non-grant permits, or security alarms have dependencies on the old table name.
Any forms, join definitions, or reports that refer to the old table name will be invalidated; these must be recreated and reloaded. Any copydb (unloaddb) scripts generated before renaming the table can no longer be used for reload operations.
Note:  For more information, see Rules and Restrictions on Renaming Tables (see Rules and Restrictions on Renaming Tables).