Oracle/PLSQL: Soundex Function

Oracle/PLSQL的Soundex函数用于返回字符串的音译表示,它不区分大小写,主要考虑前5个辅音来确定数值部分。例如,'techonthenet'、'TECHONTHENET'、'apples'、'applesaregreat'和'appplus'都将返回'S253'。这个函数在数据检索和比较中特别有用。
摘要由CSDN通过智能技术生成

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'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值