distinct 和group by的区别
这两者本质上应该没有可比性,distinct 取出唯一列,group by 是分组,但有时候在优化的时候,在没有聚合函数的时候,他们查出来的结果也一样。
一、group by
英 [ɡru:p bai] 美 [ɡrup baɪ]
[计][WIN]分组依据
拓展资料
1、This operator also serves as input to the Group By operator.
该操作符还充当Group By操作符的输入。
2、Complete the following steps to create and program the Group By operator.
完成以下步骤,创建Group By操作符并对它进行配置。
3、With the appropriate access path, the ORDER BY or GROUP BY requirement can be met without sorting.
使用恰当的访问路径,无需排序即可满足ORDER BY或GROUP BY需求。
4、Drag it to the right of the Group By operator.
将它拖放到Group By操作符的右边。
二、distinct
英 [dɪˈstɪŋkt] 美 [dɪˈstɪŋkt]
adj.明显的,清楚的;卓越的,不寻常的;有区别的;确切的
拓展资料
1、I have distinct memories of him in his last years.
我清楚地记得他最后几年的情况。
2、Another Cup marathon between the two sides is now a distinct possibility.
双方很可能再进行一场马拉松式的优胜杯比赛。
3、The photograph showed a distinct image.
照片显出了明晰的影像。
4、I want a distinct answer to my question.
我要求对我的问题作出明确的答复。
2024-10-28 广告