Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Difference between UNIQUE and DISTINCT

617414Feb 14 2008 — edited Jul 28 2013

Please help me with this confusion .

What is the difference between the following queries

Select UNIQUE(c1),c2,c3 from t1;
Select DISTINCT c1,c2,c3 from t1;
Select c1,DISTINCT c2,c3 from t1;

Does the above queries return :
1. Unique values for c1 and the corresponding min(ROWNUM) values for c2,c3.
2. Distinct combination of values for c1,c2,c3.
3. Distinct combination of values for c2,c3 and the correponding min(ROWNUM)
values for c1.

Please reply

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2013
Added on Feb 14 2008
10 comments
70,469 views