oracle数据库使用distinct多个字段_Oracle教程-查字典教程网
oracle数据库使用distinct多个字段
oracle数据库使用distinct多个字段
发布时间:2015-06-05 来源:查字典编辑
摘要:selectDISTINCT(t.f_resume_id||t.f_resume_status),t.f_resume_status,t.f...

select DISTINCT(t.f_resume_id||t.f_resume_status),t.f_resume_status,t.f_resume_status,t.f_recruit_channel,

t.f_small_channel_id

from css.T_RESUME_INFO t where t.f_resume_status in (80011,80012)

distinct多个字段,当然相同的功能也可用group by 完成

select a,b,c,min(d) d

from A

group by a,b,c

通过使用 group就可以出去相同的返回结果。就不需要使用distinct了。

二者效率,最好需要哪个的时候用哪个,group by是用来分组统计的,能用disitnct的地方就不要用group by 了。

网友摘录:

用group by 和rownum嵌套,但distinct 效率高

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新Oracle教程学习
    热门Oracle教程学习
    编程开发子分类