Skip
Arish's avatar

61. COUNT All Records


COUNT Function

COUNT returns the number of rows.

Count All Rows

sql
1SELECT COUNT(*) FROM students;

Result

COUNT(*)
25

With WHERE

sql
1SELECT COUNT(*) FROM students
2WHERE course = 'Python';

Returns: Number of Python students.