|
|
How to change or rename a column name for a table in mysql? - Mysql
|
Views : 710
|
|
Tagged in : Mysql
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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.
|
|
By - Ramya, On - 2008-07-03 |
|
|
|