Popular Tutorials
HTML
View allJavaScript
View allPage Index
Popular Tutorials
HTML
View allJavaScript
View allPopular Exercises
Page Index
MySQL Rename table
Sometimes our table name is non-meaningful, so it is required to rename or change the name of the table. MySQL provides a useful syntax that can rename one or more tables in the current database.
The following are the syntax used to change the name of the table:
RENAME old_table TO new_table;
Here, we have to make sure that new_table_name must not exist, and old_table_name should be present in the database. Otherwise, it will throw an error message. It is to ensure that the table is not locked as well as there are no active transactions before executing this statement.
Let's move on to drop table command in MySQL
Share this page on :
© 2022 AnalyzeCode.com All rights reserved.