Mysql中group by 1,2释义

2021/9/12 19:06:33

本文主要是介绍Mysql中group by 1,2释义,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

下面语句:

select "name","class","score" from score_tbl where "score" > 80 group by 1,2

等价于:

select "name","class","score" from score_tbl where "score" > 80 group by "name","class"

 

含义:

  "group by 1,2"的意思是说:按照select后面参数的第1列、第2列分组(从1开始计算,不含0)



这篇关于Mysql中group by 1,2释义的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程