CodePudding user response:
You write SQL, USES a special syntax, mysql is the group by field, but in the select, you quote of a field in the group by the other fields, it is not an error in mysql, but run as a result, the uncertainty, especially in 7.0, 8.0 the different versions,In the other database, this syntax error directly,
CodePudding user response:
You select in many fields not in the group by, was not in the aggregate function, the value is uncertainCodePudding user response:
This is not stable, if you are a novice, extend these Suggestions don't use grouping functions, otherwise, you will be taken bad,CodePudding user response:
Thank you for your great god reply I appreciateHow to use an SQL found out product_id same several products in the lowest price, the highest and the lowest price products all the information
CodePudding user response:
Also want to know mysql8, 0 compatible with mysql 5, 7 it is upgrade, change is big, thinkphp mysql 8.0 5.0,