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!

DISTINCT only for some columns

ElMazzaXAug 23 2010 — edited Aug 23 2010
hi guys!
i have a table in which i have to obtain the distinct results of the first 5 columns and attach it with the 6th column. I mean it would be something like this:

select distinct (col1,col2,col3,col4,col5), col6 from table....

i cannot make the distinct only of some columns (because if i want them in the result i have to make the distinct for all of them all of them)... how can i do that?
This post has been answered by MichaelS on Aug 23 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2010
Added on Aug 23 2010
8 comments
7,562 views