NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-126
Considerations—COUNT
Considerations—COUNT
Null values
COUNT is evaluated after eliminating all null values from the aggregate set, unless
you specify an asterisk (*). If the set is empty, COUNT returns zero.
Examples—COUNT
The following statement counts the number of distinct departments:
>> SELECT COUNT (DISTINCT DEPTNUM) FROM PERSNL.EMPLOYEE;
(EXPR)
--------------------
11
--- 1 row(s) selected.
>>
CPRLSRCE Table
The CPRLSRCE table is a catalog table that contains source definitions for each
collation described in the CPRULES table. The following table lists the contents of the
CPRLSRCE table.
The CPRLSRCE table was added in version 300.
Guardian names in the CPRLSRCE table are fully qualified and use uppercase
characters.
Column Name Data Type Description
1 CPRULESNAME * CHAR(34) Collation name
2 SEQNUMBER * SMALLINT
UNSIGNED
Sequence number for the source line; first line
has SEQNUMBER = 1
3 TEXT VARCHAR
(256)
Source text
* Indicates primary key