Using rename table in MySQL to quickly and efficiently RENAME a database (schema)
Once a new database (schema) is created in MySQL, it cannot be renamed, therefore, if you need to rename a database, the general practice is to dump the data in the
Rename table syntaxRename table Tbl_name to New_tbl_name [, tbl_name2 to New_tbl_name2] ... Use this statement to rename one or more tables.
The rename operation occurs automatically, which means that other threads cannot read any tables while
MySQL command rename tables rename table syntax
RENAME TABLE tbl_name to new_tbl_name[, tbl_name2 toNew_tbl_name2,...]Renaming is performed atomically (atomically), which means that when the name change is running, no other thread can be the table.
Five methods to change the mysql database name: 1. RENAMEDATABASEdb_nameTOnew_db_name .. This syntax is added in mysql5.1.7 and removed in 5.1.23. Data may be lost. Or don't use it. See: dev.mysql.comdocrefman5.1enrename-database.html 2
Five methods
Mysql basics: deleting databases and tables, rename a table ============== delete a DATABASE ================ drop database is used to cancel the table used in the DATABASE and cancel the DATABASE. Be careful when using this statement! To use drop
Five ways to change MySQL database name:
The code is as follows
Copy Code
1. RENAME DATABASE db_name to New_db_name
This one.. This syntax is added to the MySQL 5.1.7, 5.1.23 and removed.It is said that it is
MySQL Command rename the renametable syntax renametabletbl_nametonew_tbl_name [, tbl_name2tonew_tbl_na.
MySQL Command rename table syntax
Rename table tbl_name to new_tbl_name [, tbl_name2New_tbl_name2,...]Renaming is performed in atomic
MySQL常用指令,java,php程序员,数据库工程师必备。程序员小冰常用资料整理MySQL common commands (for reference)The most common display commands are:1. Display the list of databases.show databases;2. Display the data table in the library:Use MySQL;Show tables;3, display the
Henan College of Traditional Chinese Medicine
Course Design Report of MySQL Database Management
Title: Research and Implementation of MySQL Clusters
Completion date:2012January 1, December 31
Contents
1. Course Design overview 3
2. research
I am used to installing MySQL in binary format. today I am eager to install an RPM Package for MySQL. I did not expect that I have encountered some problems. I will share with you the problems I encountered. first, I will download the installation
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.