COUNT_BIG

Description

This function returns the number of items found in a group. COUNT_BIG operates like the COUNT function. These functions differ only in the data types of their return values. COUNT_BIG always returns a bigint data type value. COUNT always returns an int data type value. (COUNT_BIG in Transact-SQL).

Sample Source Pattern

Syntax

COUNT_BIG ( { [ [ ALL | DISTINCT ] expression ] | * } )  

Examples

Code:

SELECT COUNT_BIG(NATIONALIDNUMBER) FROM HUMANRESOURCES.EMPLOYEE AS TOTAL;

Result:

TOTAL|
-----+
  290|

Last updated