Results 1 to 7 of 7

Thread: Strange table

  1. #1
    Join Date
    Dec 2005
    Posts
    28

    Unanswered: Strange table

    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.

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    you may not have permissions on the table
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Dec 2005
    Posts
    28
    Quote Originally Posted by Thrasymachus
    you may not have permissions on the table
    I do have permissions.

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    If you didn't have permissions you would not be able to open the table at all.

    I suspect that the rowcount being displayed in the dialog box is taken from the sysindexes table. These counts are generally correct, but are not guaranteed. Run UPDATE STATISTICS on your table to make sure the rowcounts in sysindexes match reality.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  5. #5
    Join Date
    Dec 2005
    Posts
    28
    Thanks blindman. I did "update statistics" on the table but it still shows Rows: 2. I checked the sysindexes table too and it does have 2 in rowcnt field.

  6. #6
    Join Date
    Dec 2005
    Posts
    28
    Thanks All, I used:
    DBCC UPDATEUSAGE ('databasename', 'tablename') WITH COUNT_ROWS
    The problem is fixed.

  7. #7
    Join Date
    Feb 2003
    Location
    India
    Posts
    216
    there could be a problem with your table. run DBCC CHECKTABLE to see what it reports

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •