RENAME TABLE Statement You can use  RENAME TABLE  to move a table from one database to another: RENAME TABLE  current_db.tbl_name  TO  other_db.tbl_name; Using this method to move all tables from one database to a different one in effect renames the database (an operation for which MySQL has no single statement), except that the original database continues to exist, albeit with no tables. Like  RENAME TABLE ,  ALTER TABLE ... RENAME  can also be used to move a table to a different database. Regardless of the statement used, if the rename operation would move the table to a database located on a different file system, the success of the outcome is platform specific and depends on the underlying operating system calls used to move table files. If a table has triggers, attempts to rename the table into a different database fail with a  Trigger in wrong schema  ( ER_TRG_IN_WRONG_SCHEMA ) error. An unencrypted table can be moved to an encryption-enabled database and vice versa. However, if the table_encryption_privilege_check  variable is enabled, the  TABLE_ENCRYPTION_ADMIN  privilege is required if the table encryption setting differs from the default database encryption. To rename  TEMPORARY  tables,  RENAME TABLE  does not work. Use  ALTER TABLE  instead. RENAME TABLE  works for views, except that views cannot be renamed into a different database. Any privileges granted specifically for a renamed table or view are not migrated to the new name. They must be changed manually. RENAME TABLE  tbl_name  TO  new_tbl_name  changes internally generated foreign key constraint names and user-defined foreign key constraint names that begin with the string “ tbl_name _ibfk_”  to reflect the new table name.  InnoDB  interprets foreign key constraint names that begin with the string “ tbl_name _ibfk_”  as internally generated names. Foreign key constraint names that point to the renamed table are automatically updated unless there is a conflict, in which case the statement fails with an error. A conflict occurs if the renamed constraint name already exists. In such cases, you must drop and re-create the foreign keys for them to function properly. RENAME TABLE  tbl_name  TO  new_tbl_name  changes internally generated and user-defined  CHECK constraint names that begin with the string “ tbl_name _chk_”  to reflect the new table name. MySQL interprets  CHECK  constraint names that begin with the string “ tbl_name _chk_”  as internally generated names. Example: 2618 mysql>  SHOW CREATE TABLE t1\G *************************** 1. row *************************** Table: t1 Create Table: CREATE TABLE ‘t1‘ ( ‘i1‘ int(11) DEFAULT NULL, ‘i2‘ int(11) DEFAULT NULL, CONSTRAINT ‘t1_chk_1‘ CHECK ((‘i1‘ > 0)), CONSTRAINT ‘t1_chk_2‘ CHECK ((‘i2‘ < 0)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci 1 row in set (0.02 sec) mysql>  RENAME TABLE t1 TO t3; Query OK, 0 rows affected (0.03 sec) mysql>  SHOW CREATE TABLE t3\G *************************** 1. row *************************** Table: t3 Create Table: CREATE TABLE ‘t3‘ ( ‘i1‘ int(11) DEFAULT NULL,