Click here to Skip to main content
15,904,494 members
Articles / Programming Languages / SQL

SQL COUNT(*) Vs COUNT(column_name)

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
11 May 2010CPOL 6.2K   3  
Well, another major point is that the two variants serve different purposes by definition. -- Count rows where 'column_name' is NOT NULLSELECT COUNT(column_name) FROM Table_Name-- Count ALL rows in Table_Name SELECT COUNT(*) FROM Table_Name-- ... which you just as well can...

Views

Daily Counts

License

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


Written By
Database Developer Oddbit
Indonesia Indonesia
This member doesn't quite have enough reputation to be able to display their biography and homepage.

Comments and Discussions