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

What is RAID? What are the different types of RAID configurations?

797


What is the meaning of sql server?

696


Determine how to use the inserted and deleted pseudo tables?

725


Write a SQL query to make a column as unique?

777


What are parameterized reports? What are cascading parameters in ssrs reports?

129






What are information schema views?

738


Why the trigger fires multiple times in single login?

881


Explain syntax for viewing trigger?

708


Can group functions be used in the order by clause in ms sql server?

757


What is the difference between executequery () and executeupdate ()?

708


What is merge statement?

798


Explain alternate key, candidate key and composite key in sql server?

658


What is log cache in sql server?

712


Do you know what is sql injection?

719


Explain left outer join and right outer join?

758