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: SELECT COUNT(*) FROM TABLE query problem

Re: SELECT COUNT(*) FROM TABLE query problem

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Fri, 11 Oct 2002 15:20:48 +0100
Message-ID: <3da6de40$0$8506$ed9e5944@reading.news.pipex.net>


select count(*)
from table1,table2 will give you the total number of records in your cartesian product.

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
"Monty" <mmontreaux_at_hotmail.com> wrote in message
news:6284dd3.0210110547.61cfcd4c_at_posting.google.com...

> Hi there - the following hypothetical query is what I want but I can't
> figure out how to correctly formulate it (actually the real query is
> significantly more complex but the underlying problem with it
> expressed in the query below. Furthermore I don't want to have to
> perform two queries to resolve my problem).
>
> Basically I'm wanting to retrieve the total number
>
> Ideas anyone?
>
> Monty
>
> SELECT t1.COUNT(*), t2.COUNT(*)
> FROM tablename1 t1, tablename2 t2;
Received on Fri Oct 11 2002 - 09:20:48 CDT

Original text of this message

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