MySQL char (len) binary and varchar (len) binary intent

Source: Internet
Author: User

A query to make you understand

Select ' abc ' = ' abc ' as IgnoreCase, binary ' abc ' = ' abc ' as Notignorecase;

High (installed) level (forced) a bit

Select if (' abc ' = ' abc ') = 1, ' equal ', ' not Equal ') as IgnoreCase, if ([binary ' abc ' = ' abc ') = 1, ' equal ', ' not equal ') a s notignorecase;

Yes, MySQL is not case-sensitive by default, so in some query commands we may encounter this problem, the value before the binary modified data will be read in accordance with the binary (ASCII code) to operate, so there is no choice ' abc ' to the ' ABC ' also queried the issue of

MySQL char (len) binary and varchar (len) binary intent

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.