MySQL Rename TABLE statement rename the existing table name. RENAME TABLE renames one or more tables. You must have ALTER and DROP privileges for the original table, and CREATE and INSERT privileges for the new table. In addition to the tables, we can use the RENAME TABLE statement to rename views.
To rename the existing table, use the following syntax:
Parameters:
oldtablename: The old table name that you want to rename.
newtablename: The new table name for the existing table.
Note:
In the above example, we rename the existing table "tblCustomerLoan" to "tblBankCustomer".
You can use MySQL Command Line Client to rename existing table name from "tblCustomerLoan" to "tblBankCustomer". It will look like this:
You can use MySQL Command Line Client to show renamed table name. It will look like this: