RENAME TABLE
Previous  Next


RENAME TABLE old_table_name_1 TO new_table_name_1,
                                    [old_table_name_2 TO new_table_name_2, ...]

This statement will rename table old_table_name to new_table_name, all related files and memory references will be updated. After the execution of the RENAME TABLE statement, the original table can no longer be accessed as old_table_name.

Note 1: it is not possible to rename tables across databases
Note 2: if an error happens during multiple table rename, all tables before the one which caused the error are considered successfully renamed