COUNT Column
COUNT on a column ignores NULL values.
Syntax
sql
1SELECT COUNT(phone) FROM students;Only counts rows where phone is NOT NULL.
Example
sql
1-- Count students with email
2SELECT COUNT(email) FROM students;
COUNT on a column ignores NULL values.
1SELECT COUNT(phone) FROM students;Only counts rows where phone is NOT NULL.
1-- Count students with email
2SELECT COUNT(email) FROM students;