SQL -Structured Query Language - SQL Table - Alter - Rename Table Tutorial
To rename an existing created table name into a new table name, then we can use a ' RENAME TABLE ' statement.
Syntax-
The basic syntax of the RENAME TABLE statement is given below –
ALTER TABLE old_table_name RENAME TO new_table_name;
For example-
If we want to rename the regions table into the location table.
Then use the following syntax-
ALTER TABLE regions RENAME TO location;
This query or statement will rename the regions table into a location table.
In Mysql Workbench-
This query or statement will rename the user_detail table into an emp_detail table.