gpt4 book ai didi

mysql - SQL Server soundex 和 MySQL soundex 区别

转载 作者:行者123 更新时间:2023-11-29 04:33:30 24 4
gpt4 key购买 nike

您好,我想在 SQL Server 上使用 Soundex。我找到了 MySQL 的好例子:

SELECT SOUNDEX('game of thrones')

当我尝试这个查询时:

  • MySQL 返回:G513652
  • SQL Server 返回:G500

我搜索过但找不到原因。它们不一样吗?

最佳答案

来自MySQL documentation :

A standard soundex string is four characters long, but the SOUNDEX() function returns an arbitrarily long string. You can use SUBSTRING() on the result to get a standard soundex string.

MSSQL 返回的版本是正常长度,MySQL 只是由于某种原因不同。

而且看起来 MSSQL 只看第一个词。使用第三个 soundex 实现,SOUNDEX('game') 给出 G500SOUNDEX('game of thrones') 给出 G513.

关于mysql - SQL Server soundex 和 MySQL soundex 区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51812296/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com