SQL where incoming types are different, resulting in query result variance issues

Source: Internet
Author: User

The story is like this. Please listen to the niche slowly:

The original data styles are as follows:

Normal results:

Problem presentation:

The main reasons for this problem are as follows:

The following can be found on the official website:

 

For data types from high to Low: (PS: Niche translator with translation tools, not this caught dead)

Depending on the type, the large type is converted to a small type

This is a critical value issue:

The hypothesis of combining niche:

The 11,12,13,15 string is converted to an integer 11, and all where cols=11 is established.

Mysql:http://dev.mysql.com/doc/refman/5.7/en/type-conversion.html

SQL where incoming types are different, resulting in query result variance issues

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.