如何在MySQL中查询soundex() [英] How to query soundex() in mysql

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

问题描述

使用soundex()在MySql中进行搜索的正确结构是什么?我知道如何产生soundex():

What is the proper structure for searching within MySql using soundex()? I know how to produce a soundex():

select soundex('str');

只是不确定如何在我的查询中包括此内容.

just not sure how to include this in my query.

推荐答案

如果要针对people表的name字段搜索刘易斯",请执行以下查询:

If you're searching for "lewis" against the name field of people table, you perform this query:

SELECT *
FROM people
WHERE soundex("lewis") = soundex(name);

此处的示例

这篇关于如何在MySQL中查询soundex()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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