Use of the soundex () function in ORACLE Database

Source: Internet
Author: User

In the Oracle database, the SOUNDEX function returns the voice representation of the string parameter, which is useful for spelling different words, but has the same pronunciation as some others.

Syntax of the SOUNDEX function:

SOUNDEX (string)

Algorithm for Computing speech:

1. Keep the first letter of the string, but delete a, e, h, I, o, w, and y.

2. Assign the numbers in the following table to the corresponding letters.

(1) 1: B, f, p, v

(2) 2: c, g, k, q, s, x, z

(3) 3: d, t

(4) 4: l

(5) 5: m, n

(6) 6: r

3. if the string contains two or more letters with the same number (for example, B and f), or only h or w, the other strings are deleted, retain only one

4. Only the first four bytes are returned, which is not filled with 0.

Example:

Soundex ('two'), soundex ('too'), soundex ('to'), and their results are T000

Soundex ('Cap '), soundex ('cup'), all of their results are C100

Soundex ('house') and soundex ('horse'). Their results are H200 and H620 respectively.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.