Example of a MySQL proofing effect

Source: Internet
Author: User
Tags mysql sort

Suppose the column X in table T has these latin1 column values:

Muffler
Müller
MX Systems
MySQL

Suppose you use the following statement to get the column value:

SELECT X FROM T ORDER BY X COLLATE collation_name;

The results of column values that use different proofing rules are sorted as follows:

latin1_swedish_ci latin1_german1_ci latin1_german2_ci
Muffler Muffler Müller
MX系统 Müller Muffler
Müller MX系统 MX系统
MySQL MySQL MySQL

This table shows examples of the effects of using different collation rules in the ORDER BY clause. The character that causes a different sort in this example is the U (U) with two dots above, which is pronounced "U-umlaut" in German.

• The first column shows the results of a SELECT statement using the Swedish/Finnish proofing rules, which is called U-umlaut using y sorting.

• The second column shows the results of a SELECT statement using the German DIN-1 collation, which is called U-umlaut using the U sort.

• The third column shows the result of a SELECT statement using the German DIN-2 collation, which is called U-umlaut using the UE sort

Related Article

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.