Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can we make distinct of one particular column!
Tushar, I don't believe this will work. Group by requires either that you select with sum or group functions or group by every column you select.
so this would work:
SELECT COUNT(col1), col2, SUM(col3)
FROM table
GROUP BY col2
but the example below will not.
What you could do is to create a view with a select distinct to get only col2 and a key, then select from this view in the main statement.
Good luck.
-Ian
JAYABH wrote:
> If I have understood your question properly, I think what you
> could do is
> Select col1,col2,col3
> from table
> group by col2
>
> i.e you could use group by.
> Thanks and Bye for now.
> Tushar
Received on Mon Jan 05 1998 - 00:00:00 CST