Select Select?
From: <srea_at_uaex.edu>
Date: 1997/07/31
Message-ID: <870378731.3718_at_dejanews.com>#1/1
Date: 1997/07/31
Message-ID: <870378731.3718_at_dejanews.com>#1/1
I want to get a list of all tables and the number of records in those tables for just the tables that have records in them. Something like:
select table_name,(select count(*) from table_name) nrecs from all_tab_comments having nrecs > 0 order by table_name;
However, the count part is not valid here, and, even if it was valid, that second select would be looking for a table called "table_name" instead of using the value of table_name as the table to count.
How can I do this?
Please reply to:
Stephen Rea <srea_at_uaex.edu>
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Thu Jul 31 1997 - 00:00:00 CEST