Background
I have a MySQL db with around 16 million records. There are 2 columns created_at
and updated_at
which are presently in datetime
format.
The Problem
I'd like to change this to UNIX Timestamp
by converting all the values and updating the records with the new values.
I know how to do this with PHP in loops, but is there a way to perform this update by executing a single query in MySQL?