How to replace strings in a column in a MySQL database table? For example, I would like to replace http://www.systutorials.com with https://www.systutorials.com in a content column of a table post.

You may use a SQL statement as follows.

update post
set content = replace(content, 'http://www.systutorials.com', 'https://www.systutorials.com')
where content like '%http://www.systutorials.com%'

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *