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

Can we insert data into materialized view?

519


What is the difference between unique and primary key constraints?

588


What is cross join example?

556


How do I run a sql script?

518


what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba

558






how to do backup entire database? : Transact sql

620


How do you update sql?

523


Why do we use triggers?

522


What is record variable?

553


what is the different between now() and current_date()? : Sql dba

526


Explain the uses of database trigger.

658


How many developers work on postgresql?

568


What do we need to check in database testing?

561


What trigger means?

567


What is number function in sql?

530