Home » SQL & PL/SQL » SQL & PL/SQL » List of tables (Oracle 10g,Windows Xp)
List of tables [message #433240] Mon, 30 November 2009 23:25 Go to next message
prejib
Messages: 126
Registered: March 2009
Location: India
Senior Member
Hi,

I want to get the list of tables in a schema having the record count>0 ;

I have tried the below query

sql>select table_name from user_tables where num_rows>0;

But one of my freind told me , the above query will not give the exact figure if the table is not analysed .
Re: List of tables [message #433242 is a reply to message #433240] Mon, 30 November 2009 23:34 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Yes, you need to gather the statistics before running this sql.

For more information, search the forum for "count(*)".

By
Vamsi
Re: List of tables [message #433245 is a reply to message #433242] Mon, 30 November 2009 23:43 Go to previous messageGo to next message
prejib
Messages: 126
Registered: March 2009
Location: India
Senior Member
Is there any other way to find the result ?
Re: List of tables [message #433247 is a reply to message #433245] Mon, 30 November 2009 23:58 Go to previous message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Other than having statistics up to date or counting? No.

Regards
Michel
Previous Topic: Count of tables
Next Topic: Comparing a field with a Set How to ?
Goto Forum:
  


Current Time: Mon Feb 17 21:58:27 CST 2025