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: inline view vs. subquery

Re: inline view vs. subquery

From: DA Morgan <damorgan_at_exxesolutions.com>
Date: Fri, 04 Apr 2003 12:31:18 -0800
Message-ID: <3E8DEB96.B1B22ED0@exxesolutions.com>


nc wrote:

> inline view vs. subquery
>
> hello.
>
> i'm a newbie, can someone explain me,
>
> what's the diffrences and advantages of an inline view (select in
> from-clause)
>
> and subquery(select in where-clause)?
>
>
>
> thanks, thomas

INLINE VIEW SELECT field1
FROM (
   SELECT field1, count(*)
   FROM sometable
   GROUP BY field1);

SUBQUERY SELECT field1
FROM sometable
WHERE field2 IN (

   SELECT DISTINCT somevalue
   FROM someothertable);

One in the FROM clause, the other in the WHERE clause.

Daniel Morgan Received on Fri Apr 04 2003 - 14:31:18 CST

Original text of this message

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