Updated on 2022-11-18 GMT+08:00

ALTER RENAME TABLE

Function

This command is used to rename an existing table.

Syntax

ALTER TABLE oldTableName RENAME TO newTableName

Parameter Description

Table 1 Parameters

Parameter

Description

oldTableName

Current name of the table

new_table_name

New name of the table

Examples

alter table h0 rename to h0_1;

System Response

The table name is changed. You can run the SHOW TABLES command to display the new table name.