Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql count * vs count 1

COUNT(*) gives the total number of records in the table including null values.

COUNT(1) gives the total number of records in the table including null values.

COUNT(column_name) only considers rows where the column contains a non-NULL value.
Source by techybilli.com #
 
PREVIOUS NEXT
Tagged: #sql #count #count
ADD COMMENT
Topic
Name
2+8 =