SOUNDEX(string)

Description: Returns a soundex value for string.

Although a standard soundex string is four characters long, SOUNDEX() can return a string of any length. Nonalphanumeric characters in string are ignored, and international characters outside A–Z are treated as vowels.

Examples:

  • SOUNDEX('Dave') returns D100.

  • SOUNDEX('David') returns D130.

  • SOUNDEX('Davidson') returns D1325.

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.