Re: How to select from variable table?

From: Georg Scholz <georg.scholz_at_vienna.at>
Date: Fri, 18 Apr 2003 13:40:38 GMT
Message-ID: <qfTna.109997$UR.952935_at_news.chello.at>


How about this?

select table_name, num_rows from user_tables ;

Georg Scholz

"Tho Nguyen" <tho_pic_at_yahoo.com> schrieb im Newsbeitrag news:d177c6d9.0304180329.68d4756d_at_posting.google.com...
> Hi,
> I have to make a report with 2 columns. The first one is the table
> name and the second one is the number of rows in that table. I think
> the best solution for me is to create a cursor to select all the table
> from user_tables, after that using for loop iterator to get each
> elements in that cursor and select count(*).
> Unfortunately, dynamic SQL doesn't accept identifier(table name) as
> variable. so I can't do it.
> Any solutions and hints are appreciated.
> Thanks so much.
Received on Fri Apr 18 2003 - 15:40:38 CEST

Original text of this message