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: Nested select....

Re: Nested select....

From: Daniel Morgan <damorgan_at_exesolutions.com>
Date: Sun, 04 Aug 2002 00:14:42 +0100
Message-ID: <3D4C63E1.205B24E2@exesolutions.com>


Viswanath Vijayaragavan wrote:

> Folks,Problem description : Out of a list of 20 tables T1... T20, I
> want to find out the count of rows in those Tables among the 20, which
> have a column called C1 (NUMBER (22)) and the value in C1 is 125. Any
> suggestionsVJ

Assuming you have been running statistics as your are supposed to for the optimizer ...

SELECT COUNT(*)
FROM all_tables
WHERE table_name IN (

   SELECT table_name
   FROM all_tab_columns
   WHERE column_name = 'whatever');

Daniel Morgan Received on Sat Aug 03 2002 - 18:14:42 CDT

Original text of this message

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