set serveroutput on size 1000000

DECLARE
	CURSOR c1 IS
		SELECT
			table_name
		FROM
			user_tables;
	sql_stmt  varchar2(200);
	table_cnt number(10);
BEGIN
	FOR c1_rec IN c1 LOOP
		sql_stmt := 'SELECT COUNT(*) FROM ' || c1_rec.table_name;
		EXECUTE IMMEDIATE sql_stmt INTO table_cnt;
		DBMS_OUTPUT.PUT_LINE(c1_rec.table_name || ',' || table_cnt);
	END LOOP;
END;
/

quit
