Hi thanks for the reply below:
I think you are correct, I need to get some books on Oracle.
I tried the SQL statement:
select
table_name,
num_rows counter
from
user_tables
where
owner = num_rows > 0
order by
num_rows;
I ran this in a tool called Aqua Data Studio 4.7.2 and got this error:
ORA-00933: SQL command not properly ended
Do I have to substitute something in the SQL above first?
We only have 4 people in IT here and no DBA so I question if anything like last dbms_stats analyze.
is ever done.
thanks.
QUOTE (burleson @ Feb 9 2012, 07:12 PM)

Hi, and welcome to the world of Oracle!
You want to get a code collection:
http://www.dba-oracle.com/oracle_scripts.htmAnd ser set of beninner Oracle books:
http://www.rampant-books.com/menu_six_packs_bundles.htm#easy**********************************
>> What I am trying to do is get a list of all tables in the database BUT only those that contain records (not the empty tables)
Not current but as of last analyze, an easy solution:
CODE
select
table_name,
num_rows counter
from
user_tables
where
owner = num_rows > 0
order by
num_rows;
shell script
CODE
spool runme.sql
select 'select count(*) from '||table_name||';' from user_tables'||';';
spool off
@runme
SEE HERE:
http://www.dba-oracle.com/t_count_rows_all...s_in_schema.htmJoin user_tables into a PL/SQL or a sghell script:
http://www.dba-oracle.com/t_pl_sql_cursor.htmNOT TESTED
CODE
declare
tabname varchar2(50);
cursor c1 as
select
table_name
from
user_tables
having count(*) > 0
BEGIN
open c1;
loop;
fetch c1 into :tabname;
dbms_output.put_line (:tabname);
end_loop;
close c1
http://www.dba-oracle.com/t_select_tables_rows.htm