Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How can we make distinct of one particular column!

Re: How can we make distinct of one particular column!

From: Ian C. Sellers <icslu_at_boco.co.gov>
Date: 1998/01/05
Message-ID: <34B10B35.3CC09E15@boco.co.gov>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US