Examples of the mobile table with mysql

Examples of the mobile table with mysql

# Moving tables in the database 
MySQL >  Create  Database Prod; 
MySQL >  Create  Table prod.audit_log (ID int  Not  null , MSG VARCHAR ( 64 )); 
MySQL >  Create  Database Archive; 
# how 
you want to rename the table audit_log audit_log_archive_2018 

use Prod; 
the rename table AUDIT_LOG to audit_log_archive_2018; 

# want to move this table to another library, using dot notation 
use Prod; 
the rename table audit_log_archive_2018 to archive.audit_log;

Guess you like

Origin www.cnblogs.com/bjx2020/p/12120177.html