Click here to Skip to main content
11,923,046 members (60,158 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


5 bookmarked

SQL SERVER – Solution – Puzzle – SELECT * vs SELECT COUNT(*)

, 17 Jun 2011 CPOL
Earlier I have published Puzzle Why SELECT * throws an error but SELECT COUNT(*) does not. This question have received many interesting comments. Let us go over few of the answers, which are valid. Before I start the same, let me acknowledge Rob Farley who has not only answered correctly very first


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

No alternatives have been posted.


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


About the Author

India India
Pinal Dave is a Microsoft Technology Evangelist (Database and BI). He has written over 2200 articles on the subject on his blog at Along with 8+ years of hands on experience he holds a Masters of Science degree and a number of certifications, including MCTS, MCDBA and MCAD (.NET). He is co-author of two SQL Server books - SQL Server Programming, SQL Wait Stats and SQL Server Interview Questions and Answers. Prior to joining Microsoft he was awarded Microsoft MVP award for three continuous years for his contribution in community.

| | Privacy | Terms of Use | Mobile
Web01 | 2.8.151125.3 | Last Updated 17 Jun 2011
Article Copyright 2011 by pinaldave
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid