MYSQL Query rows in a database for a phrase and append it if it doesn't exist -


i have table column maps, , map names end phrase _csgo , others don't. possible search through specific column , if string doesn't have ending _csgo add it? thanks

this update query:

update table     set maps = concat(maps, '_csgo')     maps not '%_csgo'; 

actually, underscore special character in like, can do:

update table     set maps = concat(maps, '_csgo')     right(maps, 5) <> '_csgo'; 

Comments

Popular posts from this blog

java - Could not locate OpenAL library -

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

sorting - opencl Bitonic sort with 64 bits keys -