Rename or change name of MySQL table

If you change your mind and want to rename an existing MySQL table, with or without data in it, it is no problem. One simple command will change the table’s name.

To change the name of an existing table old to new, use this command as a user with adequate privileges:

RENAME TABLE old TO new;

It is good DBA manners to make sure that no one and no program are using this table before making the name change.