Combining two columns into one. In this case, I'm combining the columns ‘date’ and ‘time’. The current ‘date’ data looks like this: yyyy-mm-dd 00:00:00. The ‘time’ data: 00:00:00. If I simply combine the columns as they exist now, I'd end up with this: yyyy-mm-dd 00:00:00 00:00:00. To format the date correctly, I select only the first 11 characters from the left of the ‘date' data (which is only the year, month, day, and a single space. The 11 characters are joined to the ‘time’ data. Rows that contain ‘time’ data of null won't be modified.
update myTable set date = concat(left(date,11),time) where time is not null;