テーブル名の変更はRENAMEを使用します。
1 |
mysql> ALTER TABLE oldname RENAME newname; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
mysql> show tables; +---------------+ | Tables_in_slt | +---------------+ | member | | slt | +---------------+ 2 rows in set (0.00 sec) mysql> ALTER TABLE member RENAME user; Query OK, 0 rows affected (0.00 sec) mysql> show tables; +---------------+ | Tables_in_slt | +---------------+ | slt | | user | +---------------+ 2 rows in set (0.00 sec) |
/