mysql - Find if a string from one field is contained in another field on the same row and delete it if so -


say have following fields in each row

make      model toyota    toyota camry 

i need query check if string in make contained in model , delete portion of model value matches.

perhaps you're looking replace:

update yourtable  set model = replace(model, make, ''); 

Comments