Re: When did inline views arrive?

From: Yves Bergeron <bergeroy_at_gespro.com>
Date: 1996/06/11
Message-ID: <01bb5808.7b9a19e0$428054c7_at_1366morille>#1/1


> tkjeppesen_at_vip.cybercity.dk (Torben Krogh Jeppesen) wrote in article
 <4pa5sp$j9l_at_vip.cybercity.dk>...
> Hey, out there.
>
> Does anybody know when the "inline view" came into being on Oracle
> databases?
>
> An inline view comes in handy when you want to count the number of
> distinct values in some column:
>
> SELECT COUNT(*)
> FROM
> ( SELECT DISTINCT SOME_FIELD
> FROM SOME_TABLE)
> ;
>
> I know there are other ways to do this, but in my opinion this is the
> most logical way to express it.
>
> I have just recently discovered the feature, and I have never seen any
> documentation from Oracle. The syntax diagram in Server SQL Language
> Reference does not describe the inline view as a possibiliy and Forms
> 3.0 and PRO*C certainly don't like it, yet SQL*PLUS has no problem
> whatsoever.
>
> Torben Jeppesen
>
> Computer consultant, PMP Software, Denmark
> Email: tkjeppesen_at_vip.cybercity.dk
>
You can easily do that with a query like this:

SELECT COUNT(distinct SOME_FIELD)
  FROM SOME_TABLE   Received on Tue Jun 11 1996 - 00:00:00 CEST

Original text of this message