数据库
首页 > 数据库> > Mysql中group by 1,2释义

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)

标签:group,name,score,释义,Mysql,80,class,select
来源: https://www.cnblogs.com/lucky815/p/15257435.html