首页 > 解决方案 > 从表中的单个列中删除不间断空格的最佳查询

问题描述

我有一列包含一些值。这是一个示例值:

This is hidden in the string

这实际上是ThisU+A0is·hidden·in·the·string

我想摆脱单列的不间断空格,因此 U+A0 被常规空格替换。

在不破坏任何东西的情况下做到这一点的最佳方法是什么?

标签: sqlpostgresql

解决方案


您可以replace()在 postgresql中使用

select
   replace('ThisU+A0is·hidden·in·the·string', 'U+A0', ' ') as new_string
from yourTable

推荐阅读