COUNT
Syntax
COUNT ( { [ALL] expression } | { DISTINCT column_ref } | * )
Description
The aggregate function COUNT computes either the number of rows in a group of rows or the number of non-null values in a group of values.
For fixed length files, an exact row count is stored in the file header and can be immediately returned. For variable length files, an index is required that returns the number of keys. The first index that is found from the following is chosen: RECBYT, ROWID, first unique Index, first duplicate index. If no index is available, then a physical table scan is performed to count the actual number of rows in the table.
Example
SELECT COUNT (*)
FROM orders
WHERE order_date = SYSDATE ;