You probably want to have a loop
BEGIN
FOR t IN (SELECT table_name, num_rows
FROM user_tables)
LOOP
dbms_output.put_line( 'Table ' || t.table_name ||
' has ' || t.num_rows || ' rows.' );
END LOOP;
END;
I hope that you understand that the num_rows
value in user_tables
may have little or no relationship to the actual number of rows in the table and that it is highly unlikely to be a currently correct value.