Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Count(*) each table from user_tables
Hello Mihalis,
MIT> I want to count(*) every table from users_table table using SQL. MIT> I know how to do it in PL/SQL but not in SQL. MIT> Can you please help me do it?
SQL should know all referenced tables and fields upon parsing, since you have dynamic list of tables, that will be known only upon execution, you can not count all fields for all tables in user schema in single sql.
IF you have precise computed statistics for all tables, maybe you can use NUM_ROWS field of user_tables instead of count(*).
--
Best regards,
Edgar