Summary of the differences between collation Utf8_unicode_ci and Utf8_general_ci in MySQL

Source: Internet
Author: User
Summary of the differences between collation Utf8_unicode_ci and Utf8_general_ci in MySQL

After such a long time, found that they do not know Utf_bin and utf_general_ci the difference between the two exactly.
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 is not case-sensitive, you should use this 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

Summary of the differences 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.