Updated on 2025-07-23 GMT+08:00
Renaming Databases and Tables
TaurusDB follows the same method as MySQL Community Edition for renaming databases and tables.
- Renaming table names: Run the rename table a to b; statement. You can rename a table to move a table from one database to another. For example, rename table da.ta to db.ta moves the table ta from the database da to the database db.
- Renaming database names: Use the rename table command to move all tables from the original database to a new database, and then delete the original database. Example:
# Access the original database. use ta; # Show all table names in the original database. Show tables; # View the CREATE DATABASE statement in the original database. Show create database ta; # Use the CREATE DATABASE statement in the original database to create a new database. (Change only the database name.) create database tb; # Move all tables from the original database to the new database. rename table da.ta to db.ta; rename table da.tb to db.tb; rename table da.tc to db.tc; ... # Delete the original database. Drop database ta;
Parent topic: Basic Issues
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.