Oracle counts the respective rows of all tables under a user
Set serveroutput on
Declare
T_count number (10)
T_str VARCHAR2 (500)
Cursor t_tables is select table_name from user_tables
Begin
For t_row in t_tables loop
T_str: = 'select count (*) from' | | t_row.table_name
Execute immediate t_str into t_count
Dbms_output.put_line (t_row.table_name | |'='| | to_char (t_count))
End loop
End