An Alternative Way To Get the Table's Rowcount

  • Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/achigrik/rowcount.asp

  • This is a great article, and in most cases this is a quick and effective way to determine the number of rows. However, there is one drawback. The rowcount that is returned may not always be up-to-the-minute accurate, especially if a user has recently bulk-loaded some data into the table.

  • For example, I have a sales detailed table, containing barcodes and its quantity that are sold for the day. What If I want to query the number of items of each barcode that was sold out for the day, so my query would look like this:

    SELECT outlet, sales_date, barcode, count(qty) as Quanity

    FROM sales

    Can i still use your example?

  • This was an informative articule to find row counts. I appreciate the ease and convienance of this article.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply