RENAME TABLE
Updated at:
Copy as MD
RENAME TABLE renames a table in PolarDB-X 1.0.
Syntax
RENAME TABLE tbl_name TO new_tbl_name| Parameter | Description |
|---|---|
tbl_name | The current name of the table. |
new_tbl_name | The new name for the table. |
Example: Rename orders_old to orders:
RENAME TABLE orders_old TO orders;Limitations
Warning
PolarDB-X 1.0 does not support renaming multiple tables in a single RENAME TABLE statement.
Warning
You cannot rename a table that has a global secondary index (GSI), for stability and performance considerations.
Note
RENAME TABLE cannot rename an index. To rename an index, use the RENAME INDEX clause inside ALTER TABLE. For details, see ALTER TABLE.
What's next
ALTER TABLE — modify table schema, including renaming indexes
Is this page helpful?