MySQL Renaming a Table


Renaming a Table

To rename a table, use the RENAME TABLE statement:

Syntax:

RENAME TABLE old_table_name TO new_table_name;

Example:

RENAME TABLE employees TO staff;

This renames the employees table to staff.