Sunday, December 5, 2010

Changing the name of a column in MySQL

Changing the name of a column in MySQL.

Tested on MySQL 5.0

mysql> alter table org_table change column1 new_column1 int(11);
Query OK, 770 rows affected (0.19 sec)
Records: 770 Duplicates: 0 Warnings: 0

Ref:
http://www.tech-recipes.com/rx/379/modify-an-existing-mysql-column/

No comments: