mysql
mysql

Reputation: 13

Is it possible to rename a MySQL table name already in the database?

Is it possible to rename a MySQL table? If so, how?

Upvotes: 1

Views: 322

Answers (2)

jamesaharvey
jamesaharvey

Reputation: 14281

If you're using MySQL Query Browser, you can just right-click on the table, select Edit Table and change the Table Name field and apply the changes.

Upvotes: 0

Greg
Greg

Reputation: 321578

You can use RENAME TABLE

RENAME TABLE `foo` TO `bar`;

or ALTER TABLE

ALTER TABLE `foo` RENAME TO `bar`;

Upvotes: 9

Related Questions