ALTER TABLE table_name CHANGE old_col_name create_definition
create_definition is just like when you use CREATE .
example: col1 INT or col2 VARCHAR(20)
Hi,
How do you change a column's name in MYSQL?
thanx
ALTER TABLE table_name CHANGE old_col_name create_definition
create_definition is just like when you use CREATE .
example: col1 INT or col2 VARCHAR(20)
Where do you specify the NEW_name
if I have a db called 'testdb' and a table called 'testtable' with 'testcolumn' of def var(20)
ALTER TABLE testtable CHANGE testcolumn var(20);
I want to change the name to new_column. where?
thanx
http://www.mysql.com/documentation/m...ter/index.html aoughta have all the info you need.
Bookmarks