Sahanaa01 Sahanaa01 - 6 months ago 5x
SQL Question

update records of a column in mysql by adding a value to middle of the string

I have a column called 'url' in 'table' whose records are in the pattern ''.

I want to update these to ''. The size of the table is huge. How do I go about this?


The function to replace a string with another is REPLACE:

update my_table
set url = replace(url, 'http://', 'https://www.');