How do u count no of rows in a table?

Answer Posted / prabhudatta barick

Automatic Optimizer Statistics Collection
By default Oracle 10g automatically gathers optimizer
statistics using a scheduled job called GATHER_STATS_JOB.

As it gathers table statistics automatically
so no need to gather table statistics before
running this query.

SELECT num_rows
FROM dba_tables
WHERE table_name = '<TABLE_NAME>';

This will give u the total no. of records in a table....

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the sql versions?

513


What is cold data?

498


How do I run pl sql in sql developer?

621


What are the indexing methods?

567


Are there any features that are decommissioned in 11g that are not present in 11g?

1583






What is the difference between numeric and autonumber?

494


Is like operator in sql case sensitive?

503


Can we insert data into materialized view?

499


What are the types of keys?

508


How we can update the view?

596


Why is pl sql used?

521


Which command is used to delete a trigger?

766


What is the difference between syntax error and runtime error?

609


What is the use of triggers?

536


What is the difference between sum and count in sql?

516