I have an application that used to insert a datetime field. There was an issue though that it would insert with the seconds and it wasn’t supposed to!
I.e. 2011-08-07 15:24:06
They have corrected this and inserts now only include up to the minute so the above example would look like
2011-08-07 15:24:00
There are 20 million rows “wrong” at the moment. What is the most efficient query to fix the old ones?
This will have to read each row of the table and extract the
secondspart of the time (this is unavoidable), but it won’t have to update rows which already are correct.