Home Tutorial Mysql How to rename MySQL table?


Share on Google+Share on Google+
How to rename MySQL table?
Posted on: July 12, 2010 at 12:00 AM
In this section you will learn how to rename MySQL table.

How to rename MySQL table?

The designing and development of any software system is a continuous process and you might give a wrong name to a table. After a review you many have to change the name of database. The MySQL database provide appropriate sql command to change the database name.

The alter table <table name> rename <new table name> command can be used to rename the table.

Suppose you have a table called called account and now you have to change it to loan_account then you can use the following command to change the table name.

alter table account rename loan_account;

The above command will rename the table account to loan_account.


Related Tags for How to rename MySQL table?:

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 12, 2010

Recommend the tutorial

Advertisements Advertisements