从列中删除不需要的字符 [英] Removing unwanted character from column
问题描述
我想从列中删除字符'.'
I would like to remove the character '�' from column
列名:
asds dfgdfg
asds�dfgdfg
dfgwer werwer
dfgwer�werwer
并希望将其替换为空格
列名:
asds dfgdfg
asds dfgdfg
dfgwer werwer
dfgwer werwer
推荐答案
That is a Unicode replacement character. If this character is appearing in your table then it might be that you are issuing queries using the wrong character set. You should check the column character set, and you should also check the character set(s) of the connection(s) you use to issue queries. If there is a difference in connection character set between connections used to read and record data, or if there is a difference in expected character set between applications/scripts used to access the data, that would explain the presence of these characters.
如果您只想用空格替换它:
If you just want to replace it with a space:
UPDATE myTable SET myColumn = REPLACE(myColumn, '�', ' ')
这篇关于从列中删除不需要的字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!