COUNT
Description
This function returns the number of items found in a group. COUNT operates like the COUNT_BIG function. These functions differ only in the data types of their return values. COUNT always returns an int data type value. COUNT_BIG always returns a bigint data type value. (COUNT in Transact-SQL).
Sample Source Pattern
Syntax
COUNT ( { [ [ ALL | DISTINCT ] expression ] | * } )
Examples
Code:
SELECT COUNT(NATIONALIDNUMBER) FROM HUMANRESOURCES.EMPLOYEE AS TOTAL;
Result:
TOTAL|
-----+
290|
Last updated