sql - 从表中的单个列中删除不间断空格的最佳查询
问题描述
我有一列包含一些值。这是一个示例值:
This is hidden in the string
这实际上是ThisU+A0is·hidden·in·the·string
我想摆脱单列的不间断空格,因此 U+A0 被常规空格替换。
在不破坏任何东西的情况下做到这一点的最佳方法是什么?
解决方案
您可以replace()
在 postgresql中使用
select
replace('ThisU+A0is·hidden·in·the·string', 'U+A0', ' ') as new_string
from yourTable
推荐阅读
- django - 如何将 MongoDB 与 Django 连接起来?
- python - 将条件 RANK 窗口函数从 SQL 转换为 Pandas
- python-3.x - 使用 python 截屏时遇到问题
- php - socket_read() 无法从对等 php 重置的套接字 104 连接中读取
- node.js - 访问作为服务器运行的节点 js 代码的日志
- c# - 如何将表情符号从机器人发送给 Microsoft 团队中的用户
- node.js - 如何在猫鼬中插入或创建或保存时设置默认值
- xml - 嗨,我有一些工人记录,我需要将它们按公司分组,并按团队成员角色进行拆分
- jgrasp - 无法使用 JGrasp 打开 .class 文件
- java - 从数组中删除重复项