How do you find the number of rows in a table?

Answer Posted / uma lakshman

Hokar, You are right. But using count(*) is not optimal.

I wud suggest going for sysindexes table to find the number
of rows in a particular table.

SELECT rows FROM sysindexes WHERE id = OBJECT_ID
('table_name')

Is This Answer Correct ?    12 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to configure odbc dsn with different port numbers?

662


What is table level trigger?

667


Why people hate cursor?

808


How check triggers in sql server?

587


You schedule a job to run every minute what will happen if the first job runs more than 1 min? Will the second instance of the job start?

693






How many types of the database links?

700


What is the difference between stored procedure and functions?

680


Describe the functionalities that views support.

744


Tell me what is fill factor?

632


what is a schema in sql server 2005? : Sql server database administration

601


1.what is the diff between nolock optimizer and read uncommitted isolation? 2.what is the diff between revoke and deny? 3.what is percieved down time? 4.whether password protection are required for backups?if yes why?if no why? 5.what is fill factor? 6.what is cost analysis? 7.what is mean by piece meal restore? 8.what is 'rowguidcol'? 9.impersonate permission? 10.what is selectivity?

1727


What is the difference between sdf and mdf?

834


Explain microsoft sql server functions?

647


How to use linked server?

697


What is role playing dimension with two examples? : sql server analysis services, ssas

673