O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Moving tables across databases

You can rename a table by executing the RENAME TABLE statement.

For the following illustrations to work, create sample tables and databases

mysql> CREATE DATABASE prod;mysql> CREATE TABLE prod.audit_log (id int NOT NULL, msg varchar(64));mysql> CREATE DATABASE archive;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required