Returns the Soundex code of a string — a phonetic encoding that represents pronunciation. Useful for fuzzy matching of names.
VARCHARDiperbarui: 13 Jun 2026SOUNDEX(str)The string to encode
1 SELECT SOUNDEX('Robert') AS s1, 2 SOUNDEX('Rupert') AS s2;
Both names produce the same Soundex code.
1 SELECT name, SOUNDEX(name) AS soundex_code 2 FROM customers 3 WHERE SOUNDEX(name) = SOUNDEX('Smith');
Finds names that sound like 'Smith'.
1 SELECT name1, name2, 2 CASE WHEN SOUNDEX(name1) = SOUNDEX(name2) 3 THEN 'Similar' ELSE 'Different' 4 END AS match 5 FROM name_pairs;
Compares the phonetic similarity of two names.
Sudah paham SOUNDEX? Latih langsung di browser
Latihan interaktif, langsung di browser.