Utf8_bin, utf8_general_cs, and utf8_bin encoded by utf8 in MySQL

Source: Internet
Author: User
Utf8_bin, utf8_general_cs, and utf8_bin encoded by utf8 in MySQL

SubmittedShq6.

On 2008, November 6, am. Technical article

Utf8_general_ci is case-insensitive. you need to use it when registering your username and email address.

Utf8_general_cs is case sensitive. If the user name and email address are used, this will lead to adverse consequences.

Utf8_bin: compare strings by the binary value of each character in the string to compile and store each string in binary data. Case Sensitive and binary content can be saved

Example:

If your SQL query statement: Where first_name = "Bob"
Which of the following fields will return a match:
'Bob': utf8_bin, utf8_general_ci and utf8_general_cs
'B? B ': utf8_general_ci and utf8_general_cs will? Convert to o
'B? B ': utf8_general_ci is case insensitive

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.