Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 sp_SpaceUsed returns incorrect rowcount

Author  Topic 

Ask SQLTeam Question

0 Posts

Posted - 2005-01-13 : 07:54:58
Steve writes "I have a table that has 360 rows in it. The query 'Select count(*) from tbl_XX returns 360.

When I execute sp_SpaceUsed 'tbl_XX' the rowcnt field is 358.

I exported the table to Excel and there are 360 rows in it.

What could cause this discrepancy? I would have expeced the sp_SpaceUsed stored procedure to also show 360 rows.

I'm using SQL Server 2000 on Windows 2003 Server.


Most Valuable Yak

15732 Posts

Posted - 2005-01-13 : 07:59:01
The row count can be inaccurate unless you run sp_spaceused with the updateusage parameter, or run DBCC UPDATEUSAGE beforehand. Books Online has more information about this.
Go to Top of Page

- Advertisement -