How to change or rename a column name for a table in mysql?
by Ramya[ Edit ] 2008-07-03 16:47:14
Changing or renaming particular column name or field name for a table
Change keyword is used to alter an existing column in a MySQL table.
You can use change to rename a column by specifying both the old column name, and the new column name.
ie,
mysql> alter table [table name] change [old column name] [new column name] description;
for example,
mysql> alter table test change id Customer-id bigint(20);
Above query will change the column name from id to Customer-id.