Multiple Fields in the Oracle database using distinct

Source: Internet
Author: User
SelectDISTINCT (t. f_resume_id | t. f_resume_status), t. f_resume_status, t. f_resume_status, t. f_recruit_channel, t. f_sma

Select DISTINCT (t. f_resume_id | t. f_resume_status), t. f_resume_status, t. f_resume_status, t. f_recruit_channel, t. f_sma

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)

Multiple distinct fields. Of course, the same function can be completed by group.
Select a, B, c, min (d) d
From
Group by a, B, c

You can use group to return the same results. You do not need to use distinct.
Efficiency of the two. It is best to use the group by statement when necessary. The group by statement is used for grouping statistics, so do not use the group by statement when disitnct is used.

Excerpt from netizens:
Nested with group by and rownum, but high efficiency of distinct

,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.