Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

A better way to count(*)

By , 8 Jun 2010
Rate this:
Please Sign up or sign in to vote.
Or, assuming your table has an index, you could do this "old-school" as:
select MAX(rows) from sysindexes where id = Object_ID('{tablename}')


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Web Developer
United States United States
Starting developing in 1980's using Basic, MSC 5.0, Btrieve and DBFs. Back when men were men and there were no wizards. Since then, I have developed payroll processing system, general ledger packages, billing systems, project accounting systems, order entry, a report writer, email systems, development frameworks, C++ based Web Application Server and others that have long been forgotten.
Professionally, I have been a developer, sr. developer, development lead, architect, chief architect, CTO, director of development, and consultant. I am also in charge of changing the bottled water when empty.

Comments and Discussions

GeneralYep, that works too. PinmemberLee Humphries8-Jun-10 15:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140421.2 | Last Updated 8 Jun 2010
Article Copyright 2010 by basementman
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid