MySQL - Replace Character in Columns

后端 未结 4 1352
离开以前
离开以前 2020-11-29 20:08

Being a self-taught newbie, I created a large problem for myself. Before inserting data in to my database, I\'ve been converting apostrophes (\') in a string, to double quot

4条回答
  •  醉梦人生
    2020-11-29 20:35

    maybe I'd go by this.

     SQL = SELECT REPLACE(myColumn, '""', '\'') FROM myTable
    

    I used singlequotes because that's the one that registers string expressions in MySQL, or so I believe.

    Hope that helps.

提交回复
热议问题