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

List some advantages and disadvantages of stored procedure?

575


What are approximate numeric data types in ms sql server?

593


How can we determine what objects a user-defined function depends upon?

524


What is the difference between varchar and nvarchar?

528


What are the types of user defined functions in sql server?

507






How to disable a login name in ms sql server?

597


What are the various Operating system files that every SQL server 2005 database has and what is the purpose.

600


Explain the steps to create and execute a user-defined function in the sql server?

536


What are the different types of collation sensitivity in sql server?

590


What are the difference between primary keys and foreign keys?

546


How to update muliple row in single query?

615


How do you identify a foreign key?

609


Where to find ntwdblib.dll version 2000.80.194.0?

560


How many types of functions are there in sql server?

469


How to use column default values in insert statements in ms sql server?

534