http://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_substring-index ALTER TABLE w ADD new VARCHAR(4) DEFAULT 'fruit' COMMENT '2017-01-10 14:00:26__atermelon-fruit --- fruit'; UPDATE w SET new=SUBSTRING_INDEX(old,'-',-1);