Home Privacy Policy Feedback Link to us Site Map Forums

Oracle/PLSQL: Soundex Function


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

The syntax for the soundex function is:

soundex( string1 )

string1 is the string whose phonetic value will be returned.


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 8i, Oracle 9i, Oracle 10g, Oracle 11g

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'