UPDATE and REPLACE part of a string

前端 未结 10 2306
渐次进展
渐次进展 2020-12-04 04:22

I\'ve got a table with two columns, ID and Value. I want to change a part of some strings in the second column.

Example of Table:



        
10条回答
  •  一生所求
    2020-12-04 05:24

    query:

    UPDATE tablename 
    SET field_name = REPLACE(field_name , 'oldstring', 'newstring') 
    WHERE field_name LIKE ('oldstring%');
    

提交回复
热议问题