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

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -