|
Category: ASE: Functions: Aggregate Functions
count_big()
The
aggregate function
count_big()
counts all rows of a table, the values of which are not NULL and returns them as
bigint
datatype
. The function count_big() is available in
ASE®
starting with version 15.0.
Syntax of the Aggregate Function count_big()
count_big( [ all | distinct ] expression )
The parameters of the Aggregate Function count_big()
all
The parameter "all" returns the number of all found rows.
"all" is the default parameter of the function count_big().
distinct
The parameter "distinct" surpresses all duplicate values in the output. "distinct" is an optional parameter.
expression
The parameter
"expression"
usually serves as a placeholder for a column name in the count_big()function.
Example for the Aggregate Function count_big()
select count_big(column_name) from table_name
Counts the number of rows in a table.
select count_big(distinct column_name) from table_name
Only returns the number of non duplicate rows in a table.
It does not count rows with duplicate values.
select * from table_name_1 where 0 <
(select count_big(*) from table_name_2 where ...)
See also:
ASE T-SQL - Aggregate Functions, avg(), count(*), count(), max(), min(), sum().
|