Difference Between Count(*) and Count(Column Name)

Count(*) function return all the rows including duplicates where count(Column Name) does not because count(Column Name) excludes null values.

Examples:

Table: Student

ID

Name

Description

1

Moon

Smart

2

Rahi

Positive

3

 

 

4

Moon

Smart

 

select count(*) from student;

Count(*)

4

 

select count(name) from student;

Count(Name)

3

Comments