Oracle Tutorial

  • Home
  • Start Here
  • Basics
  • Advanced
    • Oracle View
    • Oracle Index
    • Oracle Synonym
    • Oracle Sequence
    • Oracle Administration
  • PL/SQL
  • Functions
    • Aggregate Functions
    • Analytic Functions
    • Comparison Functions
    • Date Functions
    • String Functions
  • API
    • Python Oracle
Home / Oracle String Functions / Oracle SOUNDEX

Oracle SOUNDEX

Summary: in this tutorial, you will learn how to use the Oracle SOUNDEX() function to return a string that contains the phonetic representation of a string.

Introduction to Oracle SOUNDEX() function

The SOUNDEX() function returns a string that contains the phonetic representation of a string.

The following illustrates the syntax of the SOUNDEX() function:

SOUNDEX(expression)

In this syntax, the expression is a literal string or an expression that evaluates to a string.

The SOUNDEX() function will return a string, which consists of four characters, that represents the phonetic representation of the expression.

The SOUNDEX() function is useful for comparing words that sound alike but spelled differently in English.

Oracle SOUNDEX() function examples

Let’s take some examples of using the SOUNDEX() function.

1) Basic Oracle SOUNDEX() example

This example uses the SOUNDEX() function to return the Soundex of the word 'sea' and 'see'.

SELECT SOUNDEX('see') see, SOUNDEX('sea') sea FROM dual;

Here is the result:

SEE SEA ---- ---- S000 S000

Because both words sound the same, they should receive the same Soundex value.

2) Using Oracle SOUNDEX() function with table data example

This example uses the SOUNDEX() function to find contacts whose last names sound like 'bull':

SELECT first_name, last_name FROM contacts WHERE SOUNDEX(last_name) = SOUNDEX('bull') ORDER BY last_name;

Here is the output:

oracle soundex function example

In this tutorial, you have learned how to use the Oracle SOUNDEX() function to compare if words are sound alike, but spelled differently in English.

  • Was this tutorial helpful?
  • YesNo
Previous Oracle SUBSTR
Next Oracle TRIM

Oracle Functions

  • Aggregate Functions
  • Analytic Functions
  • Comparison Functions
  • Date Functions
  • String Functions

String Functions

  • ASCII
  • CHR
  • CONCAT
  • CONVERT
  • DUMP
  • INSTR
  • INITCAP
  • LENGTH
  • LOWER
  • LPAD
  • LTRIM
  • REPLACE
  • REGEXP_COUNT
  • REGEXP_INSTR
  • REGEXP_LIKE
  • REGEXP_REPLACE
  • REGEXP_SUBSTR
  • RPAD
  • RTRIM
  • SOUNDEX
  • SUBSTR
  • TRANSLATE
  • TRIM
  • UPPER

About Oracle Tutorial

OracleTututorial.com website provides Developers and Database Administrators with the updated Oracle tutorials, scripts, and tips.

Search

Recent Tutorials

  • Oracle Implicit Statement Results
  • Calling PL/SQL Stored Functions in Python
  • Calling PL/SQL Procedures in Python
  • Managing Transaction in Python
  • Deleting Data From Oracle Database in Python

Site Links

  • Oracle Books
  • About
  • Contact
  • Privacy Policy
  • Terms of Use

Copyright © 2021 Oracle Tutorial. All Rights Reserved.