Answer the question
In order to leave comments, you need to log in
How to remove a specific sql value from a string?
There is a selection
SELECT * FROM `alias` WHERE `keyword` like '%.html'
How do I remove the ending '.html' from all rows in the keyword column
Answer the question
In order to leave comments, you need to log in
I did this
UPDATE `alias` SET `keyword` = REPLACE( `keyword` , '.html', '' ) WHERE `keyword` LIKE '%.html'
Use substr to strip off the last 5 characters.
Something likeupdate 'alias' set keyword=substr(keyword,0,-5)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question