Renaming a Table : Rename Table : Table MySQL TUTORIALS


MySQL TUTORIALS » Table » Rename Table »

 

Renaming a Table


mysql>
mysql> CREATE TABLE Employee(
    ->     id            int,
    ->     first_name    VARCHAR(15),
    ->     last_name     CHAR(15),
    ->     start_date    DATE,
    ->     end_date      DATE,
    ->     salary        FLOAT(8,2),
    ->     city          VARCHAR(10),
    ->     description   VARCHAR(15)
    -> );
Query OK, rows affected (0.05 sec)

mysql>
mysql> ALTER TABLE employee RENAME employee_Table;
Query OK, rows affected (0.01 sec)

mysql>
mysql> SHOW TABLES FROM test;
+----------------+
| Tables_in_test |
+----------------+
| employee_table |
+----------------+
row in set (0.00 sec)

mysql>
mysql> drop table employee_Table;
Query OK, rows affected (0.00 sec)

mysql>
mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Table
» Rename Table