Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

all tables with at least 1 row of populated data

702056Dec 16 2009 — edited Dec 16 2009
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 13 2010
Added on Dec 16 2009
3 comments
1,111 views