数据库
首页 > 数据库> > 如何在mysql中查询soundex()

如何在mysql中查询soundex()

作者:互联网

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

select soundex('str');

只是不知道如何在我的查询中包含这个.

解决方法:

如果您在人员表的名称字段中搜索“lewis”,则执行以下查询:

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

example here

标签:mysql,soundex
来源: https://codeday.me/bug/20190623/1274792.html