DEVFYI - Developer Resource - FYI

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

ORACLE Interview Questions and Answers (Part 4)


(Continued from previous question...)

554. 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.

(Continued on next question...)

Other Interview Questions