MySQL中的Postgresql unaccent()等效项 [英] Postgresql unaccent() equivalent in MySQL

查看:149
本文介绍了MySQL中的Postgresql unaccent()等效项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在查询中比较两个字符串,如下所示:

i have to compare two strings in a query like following:

SELECT *
FROM MY_TABLE
WHERE column LIKE '%keyword%';

但是我想比较两个列的未重音值关键字。在MySQL中有unaccent()函数或其他方法可以实现吗?

But i want to compare unaccented values of both column and keyword. Is there an unaccent() function or other way to achieve this in MySQL?

推荐答案

AFAIK,没有 unaccent()函数存在于 MySQL 中。要忽略重音,必须为要比较的列设置正确的排序规则。示例:如何在MySQL中删除重音符号?

AFAIK, No there is no unaccent() function present in MySQL. To ignore the accent you will have to set the proper collation for the column you are trying to compare. Example: How to remove accents in MySQL?

这篇关于MySQL中的Postgresql unaccent()等效项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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