Unicode (hexadecimal) character literals in MySQL

前端 未结 5 1661
遇见更好的自我
遇见更好的自我 2021-01-05 15:21

Is there a way to specify Unicode character literals in MySQL?

I want to replace a Unicode character with an Ascii character, something like the following:



        
5条回答
  •  佛祖请我去吃肉
    2021-01-05 16:11

    You can use the hex and unhex functions, e.g.:

    update mytable set myfield = unhex(replace(hex(myfield),'C383','C3'))
    

提交回复
热议问题