I want to convert a column data type from TIMESTAMP to DATETIME in a table with more than one million of lines.
Is it possible? Is it slow? Will I loose the old information or MySQL can convert this automatically? Can I just do an alter table or may I do something different?
Is it possible? - Yes
Is it slow? - It will probably take a while.
The difference between TIMESTAMP and DATETIME is explained a bit over here: Should I use field 'datetime' or 'timestamp'?
Generally, I don't think changing a type is a smart thing to do unless you are really left without any other options. You will lose data that you actually want to keep or data that needs to exists will be created. This data is most likely not going to be what you need it to be.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With