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 -

amazon web services - Installing MobileFirst 7.0 server on AWS -

Non Unique Username with ASP.Net Identity 2.0 -