all tables with at least 1 row of populated data
702056Dec 16 2009 — edited Dec 16 2009Hi,
How do you find all tables that have at least 1 row of data...this query pulls 1226 tables, but many of the tables are empty and I want to isolate only the ones that are populated with fields.. please advise..Thanks
select distinct column_name from all_tab_columns where owner IN ('ALUMNI','FAISMGR','FIMSMGR','GENERAL','TAISMGR','PAYROLL','POSNCTL','SATURN')
and column_name LIKE '%_PIDM' and column_name LIKE '%_PIDM'
ORDER BY 1;
where rownum < 1 and column_name iis not null don't work.. this might be simple, but i'm lost