I have a set of tables in Oracle and I would like to identify the table that contains the maximum number of rows.
So if, A has 200 rows, B has 345 rows and C has 120
select max(select count(*) from A union select count(*) from B...)
should work.
edit: if you want something dynamic, you can build a string in PL/SQL with each "count(*)" subquery (for example, listing the table names from USER_TABLES), and then execute te main query with:
execute immediate 'select max('||subquery||')'