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

Home -> Community -> Usenet -> c.d.o.server -> Re: sub-selects

Re: sub-selects

From: Ryan <rgaffuri_at_cox.net>
Date: Sat, 25 Oct 2003 16:18:34 -0400
Message-ID: <pUAmb.105101$a16.101960@lakeread01>


ive talked to some people who have used sub-queries in the 'select' part of a query to answer the same questions that you do with group by's, but get better performance.

i have yet to see examples. anyone have some? Or any real uses for sub-selects? I have yet to need them.

select (select stuff from table)
from table;

etc...

"Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message news:1067099291.457056_at_yasure...
> Ryan wrote:
>
> >Ive never really had to use these yet and I dont see much in the
> >documentation on them. I have heard you can use these in place of group
bys
> >to improve performance. does anyone have any real world examples?
> >
> >
> >
> If you are referrring to the GROUP BY clause ... it has nothing to do
> with SUBQUERIES.
> They are two entirely different things serving very different purposes.
> GROUP BY is used
> when using aggregating functions such as COUNT, SUM, AVG. A sub-select
> is not going
> substitute for this functionality.
>
> --
> Daniel Morgan
> http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
> http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
> damorgan_at_x.washington.edu
> (replace 'x' with a 'u' to reply)
>
Received on Sat Oct 25 2003 - 15:18:34 CDT

Original text of this message

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