Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

SOUNDEX

Example

Assess the similarity between two strings and generate a four-character code based on their pronunciation.

SELECT SOUNDEX(‘Juice’), SOUNDEX(‘Jucy’);

Definition and Usage

The SOUNDEX() function generates a four-character code to assess the similarity of two expressions based on their pronunciation.

Tip: Consider using the DIFFERENCE() function in conjunction with SOUNDEX().

Syntax

SOUNDEX(expression)

Parameter Values

Parameter

Description

expression

Required: The expression to evaluate, which can be a constant, variable, or column.

Technical Details

Works in:

 SQL Server (from 2008 onwards), Azure SQL Database, Azure SQL Data Warehouse, and Parallel Data Warehouse

More Examples

Example

Assess the likeness between two strings and produce a four-character code.

SELECT SOUNDEX(‘Juice’), SOUNDEX(‘Banana’);