Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Empty Table
Mitigating the risk of checking potentially large table is
easy with a simple modification.
add a where clause:
WHERE rownum < 2;
Any table with a single row is obviously not empty.
Jared
On Sun, 23 Jan 2005 21:45:50 -0700, Stephen Andert <andert_at_gmail.com> wrote:
> Probably the easiest is to analyze the schema and then select
> table_name from dba_tables where numrows (sp?) = 0.
>
> Or you could select count(*) from all tables with some dynamic SQL,
> but if any of the tables are large, that could get time and CPU
> consuming.
>
> HTH
> Stephen
>
> On Sun, 23 Jan 2005 20:06:42 -0800 (PST), Kean Jacinta
> <jacintakean_at_yahoo.com> wrote:
> > Hello
> >
> > I need some help here. I need to get a report of all
> > the table that are empty on a schema.
> >
> > How shall i do that ?
> >
> > Thank In advance
> >
> > JK
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail - Easier than ever with enhanced search. Learn more.
> > http://info.mail.yahoo.com/mail_250
> > --
> > http://www.freelists.org/webpage/oracle-l
> >
> --
> http://www.freelists.org/webpage/oracle-l
>
-- Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist -- http://www.freelists.org/webpage/oracle-lReceived on Mon Jan 24 2005 - 13:59:21 CST
![]() |
![]() |