Friday, June 21, 2013

Convert types in mysql fields

For example, I show how you can convert varchar field to double field. We will use alter table statement. Ok, let's go!
ALTER TABLE products MODIFY COLUMN product_price DOUBLE

P.S. I'd be very tempted to make a backup of the data. It'll take a second. It's better to be safe rather than sorry.

No comments: