soundex

Description

Returns a four-character soundex code for character strings that are composed of a contiguous sequence of valid single- or double-byte Roman letters.

Syntax

soundex(char_expr | uchar_expr)

Parameters

char_expr

is a character-type column name, variable, or constant expression of char, varchar, nchar, or nvarchar type.

uchar_expr

is a character-type column name, variable, or constant expression of unichar or univarchar type.

Examples

Example 1

select soundex ("smith"), soundex ("smythe")
----- -----  
S530  S530

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute soundex.

See also

Documentation Transact-SQL Users Guide

Function difference