SQL Language Guide : 8. SQL Statements : RENAME TABLE
 
Share this page                  
RENAME TABLE
Valid in: SQL, ESQL, OpenAPI, ODBC, JDBC, .NET
This statement renames tables. For an alternative method of renaming tables, see ALTER TABLE.
This statement has the following format:
[EXEC SQL] RENAME TABLE [schema.]table_name TO new_table_name
Indexes, grants, comments, synonyms, and sequences are automatically transferred to the newly renamed table or column.
The rename operation will fail with an error if any views depend on the old table name.
Forms, join definitions, or reports that refer to the old table name will be invalidated, and must be recreated and reloaded. Any copydb or unloaddb scripts generated before renaming the table can no longer be used for reload operations.
For more information, see Rules and Restrictions on Renaming Tables.