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: Counting foreign keys

Re: Counting foreign keys

From: Sergey Gerasimov <gsa_at_baltros.ru>
Date: Fri, 29 Dec 2000 12:02:34 +0300
Message-ID: <3a4c6142@ns.baltros.ru>

>
> TABLEA
> (
> pk
> )
>
> TABLEB
> (
> pk2
> fk REFERENCES TABLEA(pk)
> )

select tablea.pk, count(tableb.pk2)

   from tablea, tableb where tablea.pk = tableb.pk (+) group by tablea.pk;

--
Regards
Sergey Gerasimov
gsa_at_baltros.ru
Received on Fri Dec 29 2000 - 03:02:34 CST

Original text of this message

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