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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 A strange table

Author  Topic 

jeb0323
Starting Member

26 Posts

Posted - 2006-04-24 : 13:54:12
I have a table. It shows "Rows: 2" when I open it in the table properties dialog. But there is no record in the table when I open it from Open Table -> Return All Rows.

I don't understand how this can happen. Any help is appreciated.

Thanks.

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-04-24 : 14:29:27
Execute this in Query Analyzer against that table, and see if that clears up the problem:
exec sp_spaceused 'MyTableName', 'true'


CODO ERGO SUM
Go to Top of Page

jeb0323
Starting Member

26 Posts

Posted - 2006-04-24 : 14:46:13
I did and here is the result:
****************
name rows reserved data index_size unused
PrintQueue 2 344 KB 160 KB 152 KB 32 KB
****************

If I run select count(*) from PrintQueue and it returns 0.
Go to Top of Page

jeb0323
Starting Member

26 Posts

Posted - 2006-04-24 : 15:18:16
Thanks All, I used:
DBCC UPDATEUSAGE ('databasename', 'tablename') WITH COUNT_ROWS
The problem is fixed.
Go to Top of Page
   

- Advertisement -