I want to convert a column data type from DATETIME to TIMESTAMP in a table with more than one million of lines.
Is it possible? Is it slow? Will I lose the old information or MySQL can convert this automatically? Can I just do an alter table or may I do something different?
Best Answer
Here is a test script:
Here is its execution (using MySQL 5.5.12-log for Windows):
Looks like it works. If you do not trust this small sample, then make a copy of the table and perform this with the copy.
Give it a Try !!!