GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL
Go To First  |  Previous Question  |  Next Question 
 SQL  |  Question 26 of 171    Print  
How do you find the numbert of rows in a Table ?
A bad answer is count them (SELECT COUNT(*) FROM table_name)
A good answer is :-
'By generating SQL to ANALYZE TABLE table_name COUNT STATISTICS by querying Oracle System Catalogues (e.g. USER_TABLES or ALL_TABLES).
The best answer is to refer to the utility which Oracle released which makes it unnecessary to do ANALYZE TABLE for each Table individually.



  
Total Answers and Comments: 3 Last Update: September 04, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
February 08, 2006 09:04:17   #1  
rajaramian        

RE: How do you find the numbert of rows in a Table ?

Following query will help to find out number of rows in a table

select count(*) from <table_name>;


 
Is this answer useful? Yes | No
February 08, 2006 10:39:10   #2  
gony Member Since: January 2006   Contribution: 26    

RE: How do you find the numbert of rows in a Table ?
use SY-DBCNT. It is used to count number of rows in a databse table.in internal tables we use SY-TABIX.cheers dude....bye
 
Is this answer useful? Yes | No
September 04, 2007 11:47:42   #3  
safdar Member Since: September 2007   Contribution: 5    

RE: How do you find the numbert of rows in a Table ?
If you want to find the number of Rows in table
SELECT COUNT(*) FROM EMP;
This is valid query

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape