Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: How do I find emty tables
OK, thanks for all your answers. I think that I have a way of dealing with this problem now.
/Niklas
Boris Bunjan wrote:
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message
> news:tg2sksbb43016c_at_beta-news.demon.nl...
> >
> > "Niklas Danielsson" <niklas.danielsson_at_eget.fi> wrote in message
> > news:3B0106D8.C42783C_at_eget.fi...
> > > Hello all!
> > >
> > > I would like to find alla tables that are emty = 0 rows in the database.
> > > The problem is that I can't analyze the the tables so I can't use
> > > NUM_ROWS in DBA_TABLES.
> > >
> > > Is there any other way?
> > >
> > > TIA
> > >
> > > niklas.danielsson_at_eget.fi
> > >
> >
> > If you don't want to do it the easy way, you obviously need to resort to
...
> > select count(*) from <table>
> > and then a series of them.
> >
> > You could of course filter out all tables with more than 1 extent (they
> > likely don't need to be counted), but the rest ... no other solution.
> > Yes, it will be slow, as the non-empty tables will be counted.
> >
> > Regards,
> >
> > Sybrand Bakker, Oracle DBA
> >
> >
>
![]() |
![]() |