PostgreSQL:选择包含特殊字符的文本
我想选择以下字符串的选择:
Pink
Nando's
M&M's
Banana
Black & White
如您所见,有和没有特殊字符的单词组合。实际列表太长(> 3K项目),因此我想知道最通用的选择方法,因为以下选择是行不通的:
select *
from my_table
where col1 in (
'Pink',
'Nando's',
'M&M's',
'Banana',
'Black & White')
也不会使用,例如'%my string%'< /代码>
I would like to make the selection of the following strings:
Pink
Nando's
M&M's
Banana
Black & White
As you can see there's a combination of words with and without special characters. The actual list is too long (> 3k items), so I'd like to know the most generic way of making this selection as the following won't work:
select *
from my_table
where col1 in (
'Pink',
'Nando's',
'M&M's',
'Banana',
'Black & White')
nor will using LIKE '%my string%'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论