1. Home
  2. Computing & Technology
  3. PHP / MySQL

Change MySQL Command

By Angela Bradley, About.com

Definition: Change is used to alter an existing column in a MySQL table. You can use change to rename a column by providing both the old column name, and the new column name. It is written as: alter table [table name] change [old column name] [new column name] varchar (30) ;
Also Known As: Change Column, Rename Column
Examples:
alter table colors change tone hue varchar (10) ;
This causes the column called "tone" to be renamed to "hue" on the table called "colors".

Explore PHP / MySQL

More from About.com

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. MySQL Commands
  5. Alter Table Change - MySQL Change - SQL Change

©2008 About.com, a part of The New York Times Company.

All rights reserved.