SQL COUNT CLAUSE



The COUNT() function returns the number of rows that matches a specified criteria.

SYNTAX:

SELECT COUNT(column_name)
FROM   table_name
WHERE  CONDITION;

EXAMPLE:

SELECT  COUNT(NAME) FROM student WHERE CLASS='FIRST';
Displays the count of students who is having the class as first.

No comments:

Post a Comment