Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rename a mysql column

Status
Not open for further replies.

NevadaJones

Programmer
Sep 5, 2006
26
I searched but could not find this. Also I mistakenly posted this first in the PHP forum and can't delete it.

What is the syntax to rename a table column in a MySql database? I am trying this but it is not right.

ALTER table
CHANGE oldcolumn_name
newcolumn_name
CHAR(30)
 
Thanks for the hint. The syntax is:

ALTER TABLE tablename
CHANGE oldcolumnname
newcolmnname
definition

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top