The difference between collation Utf8_unicode_ci and Utf8_general_ci in MySQL

Source: Internet
Author: User

Utf8_unicode_ci and Utf8_general_ci have no real difference between Chinese and English.
Utf8_general_ci proofreading speed is fast, but the accuracy is slightly worse.
Utf8_unicode_ci accuracy is high, but the proofreading speed is slightly slower.

If your application is German, French, or Russian, be sure to use UTF8_UNICODE_CI. The general use of utf8_general_ci is enough.

Report:

CI is case insensitive, that is, "casing is not sensitive", a and a will be in the character judgment will be treated as the same;
The bin is binary, and a and a are treated differently.
For example you run:
SELECT * FROM table WHERE txt = ' a '
Then in Utf8_bin you can't find the line of txt = ' a ', and utf8_general_ci can.
Utf8_general_ci Case-insensitive, this is what you use when registering your username and mailbox.
Utf8_general_cs case-sensitive , if the user name and mailbox Use this will be bad consequences
utf8_bin: String Each string is compiled with binary data stored. case-sensitive and binary content can be stored

The difference between collation Utf8_unicode_ci and Utf8_general_ci in MySQL

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.