Remove/replace special characters in column values?

前端 未结 2 1727
野趣味
野趣味 2021-01-13 17:00

I have a table column containing values which I would like to remove all the hyphens from. The values may contain more than one hyphen and vary in length.

Example: f

2条回答
  •  旧时难觅i
    2021-01-13 17:36

    You can use this.

    update table set column = format('%s%s', left(column, 3), right(column, -6));

    Before:

    After:

提交回复
热议问题