SQL Oracle Java JSP JDBC PHP MORE

Oracle COUNT() function with Example

The Oracle COUNT() function is used to count number of rows in a table.

Oracle COUNT() Syntax

SELECT COUNT(column_name)
FROM table_name
WHERE condition;

Oracle COUNT() Example

In this example we count how many Rollno in the students_data table.

RollNo Name Address ContactNo
1 Divya Mumbai 9437911966
2 Hritika Pune 9887454545
3 Amit Delhi 7766888888

Oracle Query

SELECT COUNT(RollNo)
FROM students_data;

Output

3