tags:

views:

75

answers:

3

I want to change the data type of multiple columns from float to int. What is the simplest way to do this?

There is no data to worry about, yet.

+5  A: 

http://dev.mysql.com/doc/refman/5.1/en/alter-table.html

ALTER TABLE tablename MODIFY columnname INTEGER;

This will change the datatype of given column

Depending on howmany columns you wish to modify it might be best to generate a script, or use some kind of mysql client GUI

Yannick M.
A: 

You use the alter table method.

ALTER TABLE table CHANGE columnname VARCHAR(255)
Ólafur Waage
CHANGE requires an old columnname and a new columnname
Yannick M.
A: 

simplest way? do you use Mysql GUI tools

Its easier from there i guess

Narayan
And what if he has only a console to work with, i.e. no GUI?
Mr. Smith