Oracle SQL - Function SOUNDEX function

Introduction

SOUNDEX function converts a string to a code value.

Words with similar sounds will have a similar code value.

You can use SOUNDEX to compare words that are spelled slightly differently but sound basically the same.

The general format for this function is:

SOUNDEX(string) 

Demo

SQL>
SQL>-- ww  w .  j a  v  a 2s .co  m
SQL> SELECT SOUNDEX('right') FROM dual;

SOUN
----
R230
SQL>
SQL> SELECT SOUNDEX('rite') FROM dual;

SOUN
----
R300
SQL>