A brief analysis of compatibility issues with a MySQL syntax (using count in queries)

Source: Internet
Author: User
This article is a detailed analysis of the compatibility of MySQL syntax (using count in queries), the need for a friend under the reference

In simple terms, count and more fields are used in queries

Copy Code code as follows:
Select count (ID), id,name from table


It's embarrassing, my environment is 5.5, this is to get the result, but run to the server is not
All right, I made a mistake.

Copy Code code as follows:
#1140-mixing of GROUP columns (MIN (), MAX (), COUNT (),...) with no group columns was illegal if there is no GROUP BY clause


In the 5.x is available, but the value of the other fields is only to get the first message, OK, I admit that this is a partial door to the writing, there is no practical significance, may be a novice's grammatical structure of the idea is not clear.
Well, as a newcomer, I'd be wise to switch over with the WAMP version switch.

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.