当前位置:网站首页>Oracle/PLSQL: Soundex Function

Oracle/PLSQL: Soundex Function

2022-06-27 01:35:00 yuanlnet

In Oracle/PLSQL, the soundex function returns a phonetic representation (the way it sounds) of a string.

Syntax

The syntax for the soundex function is:

soundex( string1 )

string1 is the string whose phonetic value will be returned.

Note

The Soundex algorithm is as follows:

  1. The soundex return value will always begin with the first letter of string1.
  2. The soundex function uses only the first 5 consonants to determine the NUMERIC portion of the return value, except if the first letter of string1 is a vowel.
  3. The soundex function is not case-sensitive. What this means is that both uppercase and lowercase characters will generate the same soundex return value.

Applies To

  • Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

For Example

soundex('tech on the net');

would return 'T253'

soundex('TECH ON THE NET');

would return 'T253'

soundex('apples');

would return 'A142'

soundex('apples are great');

would return 'A142'

soundex('applus');

would return 'A142'

原网站

版权声明
本文为[yuanlnet]所创,转载请带上原文链接,感谢
https://blog.csdn.net/yuanlnet/article/details/125446456