The Oracle COUNT() function is used to count number of rows in a table.
SELECT COUNT(column_name)
FROM table_name
WHERE condition;
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 |
SELECT COUNT(RollNo)
FROM students_data;
3