A brief analysis of the compatibility problem of MYSQL syntax of using count in a query
- 2020-05-27 07:21:01
- OfStack
This simply means using count and more fields in the query
It is very embarrassing that my environment is 5.5, so I can get the result, but I can't run it to the server
Well, I reported an error
It can be used in 5.x, but the values of other fields only get the information of item 1. Well, I admit that this is a way of writing a side door, which has no practical significance and may be caused by the unclear thinking of a new grammar structure.
Well, as a newcomer, I'd be wise to use the version of WAMP to switch over
select count(id),id,name from table
It is very embarrassing that my environment is 5.5, so I can get the result, but I can't run it to the server
Well, I reported an error
#1140 - Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
It can be used in 5.x, but the values of other fields only get the information of item 1. Well, I admit that this is a way of writing a side door, which has no practical significance and may be caused by the unclear thinking of a new grammar structure.
Well, as a newcomer, I'd be wise to use the version of WAMP to switch over