SQL Server SOUNDEX() Function
Example
Evaluate the similarity of two strings, and return a four-character code:
SELECT SOUNDEX('Juice'), SOUNDEX('Jucy');
Try it Yourself »
Definition and Usage
The SOUNDEX() function returns a four-character code to evaluate the similarity of two expressions.
Note: The SOUNDEX() converts the string to a four-character code based on how the string sounds when spoken.
Tip: Also look at the DIFFERENCE() function.
Syntax
SOUNDEX(expression)
Parameter Values
Parameter | Description |
---|---|
expression | Required. The expression to evaluate. Can be a constant, variable, or column |
Technical Details
Works in: | SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse |
---|
More Examples
Example
Evaluate the similarity of two strings, and return a four-character code:
SELECT SOUNDEX('Juice'), SOUNDEX('Banana');
Try it Yourself »
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.