RENAME a table

To rename a table, use the RENAME keyword:

mysql> rename table Students to pupils;
Query OK, 0 rows affected (0.04 sec)

 

 

Verify the table has been renamed:

mysql> show tables;
+-------------------+
| Tables_in_Academy |
+-------------------+
| customers         |
| orders            |
| pupils            |
+-------------------+
3 rows in set (0.00 sec)

Leave a Reply