how to find and replace a word in a mysql column?

前端 未结 2 965
青春惊慌失措
青春惊慌失措 2021-02-04 02:35

I have a column containing list of streets. I need to replace \'street\' with \'St\'. The replacement can be made in the current column or in a new column with the address in th

2条回答
  •  独厮守ぢ
    2021-02-04 03:01

    Run a query like this to update in the same column:

    UPDATE table 
       SET column = REPLACE(column, 'Street', 'St');
    

提交回复
热议问题