Edit mysql table
问题 I want to edit an entire mysql table's row. I don't really know mysql at all, so in basic programming this is what I want to do: from row year in table videos: The key here is that I want to prepend 19/20 and not add it. if (year < 50) year = year+2000 else year = year+1900 How would I go about doing this? 回答1: Try this: UPDATE yourtable SET year = year + IF(year >= 50, 1900, 2000) This will work both if your column is an integer type and also if it is a character type. 回答2: mysql> create