从列中删除不需要的字符 [英] Removing unwanted character from column

查看:90
本文介绍了从列中删除不需要的字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从列中删除字符'.'

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

推荐答案

这是 Unicode替换字符.如果此字符出现在表中,则可能是您使用错误的字符集发出查询.您应该检查列字符集,还应该检查用于发出查询的连接的字符集.如果用于读取和记录数据的连接之间的连接字符集存在差异,或者用于访问数据的应用程序/脚本之间的预期字符集存在差异,则可以解释这些字符的存在.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆