forked from docs/doc-exports
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
3.3 KiB
3.3 KiB
Changing a Table Name
Function
The ALTER TABLE ... RENAME command is used to change the table name.
Syntax
ALTER TABLE tableName RENAME TO newTableName
Parameter Description
Parameter |
Description |
---|---|
tableName |
Table name. |
newTableName |
New table name. |
Example
ALTER TABLE table1 RENAME TO table2
Response
You can run the SHOW TABLES command to view the new table name.
Parent topic: SparkSQL Schema Evolution and Syntax Description