SELECT Table with maximum number of rows from one schema
IoriFeb 5 2008 — edited Feb 12 2008Hello everyone,
I would like to find the table which contains the maximum number of rows in a
schema.
SELECT table_name, MaxRows
FROM (SELECT MAX (num_rows) MaxRows, table_name
FROM dba_tables
WHERE owner = 'MySchema' group by table_name order by MaxRows desc );
The above statement returns the entire list of tables.
Table_Name MaxRows
Table A 21000
Table B 12000
Table C 250
How can I get as result only one single table_name without the entire list of table and order by etc.?
Table_Name
Table A
Kind Regards,