Update a column value, replacing part of a string

say  we have entries like  http://domain.com/v1/xyz/* in url column of my table “links” where * stand for different-2 values. I want to replace domain.com =>  in all  my url entires.

Asked on September 15, 2020 in Mysql.
Add Comment
1 Answer(s)
update [table_name] set [field_name] = 

so in your case say,

update links set url = replace(url, 'domain.com', ''); 

first try for 1 row by using where condition. If all fine .. run without where condition..
Answered on September 15, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.