How to rename the table in MySQL?

RENAME table

Syntax:

ALTER TABLE table_name
RENAME TO new_table_name;

Example:

In this example, the table name cus_tbl is renamed as cus_table.

ALTER TABLE cus_tbl
RENAME TO cus_table;

Output:

mysql alter table 11

See the renamed table:

mysql alter table 12