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:
- The soundex return value will always begin with the first letter of string1.
- 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.
- 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' |