question

rmatthews avatar image
rmatthews asked

Number of rows in a table?

When I click on Object Explorer in MS SQL SRVR MGMT Studio 2008, how can I easily see the number of rows in a particular table?
table
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
KenJ avatar image
KenJ answered
right click the table, select properties then view the "Storage" page. There is a Row count number there. ![alt text][1] [1]: /storage/temp/3045-tablerowcount.png

tablerowcount.png (30.5 KiB)
4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rmatthews avatar image rmatthews commented ·
Thanks! Exactly what I needed to know. Is there an easy way to get a simple report (or Excel table) for all the tables in a database with two columns; 1) name of the tables, 2) number of rows in the table
0 Likes 0 ·
ThomasRushton avatar image ThomasRushton ♦♦ rmatthews commented ·
Quick & dirty way: select t.name, i.rowcnt from sys.tables t left join sysindexes i on t.object_id = i.id where i.indid in (0,1)
2 Likes 2 ·
Kev Riley avatar image Kev Riley ♦♦ rmatthews commented ·
Also in SSMS, right-click database, Reports -> Standard Report -> Disk Usage by Table
2 Likes 2 ·
rmatthews avatar image rmatthews commented ·
Thanks! That's exactly what I needed to know.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.