The ALTER TABLE ... RENAME command is used to change the table name.
ALTER TABLE tableName RENAME TO newTableName
Parameter |
Description |
---|---|
tableName |
Table name. |
newTableName |
New table name. |
ALTER TABLE table1 RENAME TO table2
You can run the SHOW TABLES command to view the new table name.