17.10 - COUNT_mode - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Database Utilities

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Publication ID
English (United States)

Determines the data type returned by COUNT operations.

Field Group


Valid Settings

Setting Description
0 Data type depends on session mode:
  • For ANSI session mode, the data type is DECIMAL.
  • For Teradata session mode, the data type is INTEGER.
1 Data type is NUMBER.
2 Data type is BIGINT.



Changes Take Effect

After the DBS Control Record has been written.

Usage Notes

If you experience numeric overflow errors with COUNT operations, try changing this field value to 1 or 2. This can happen for tables with billions of rows, specifically in Teradata session mode if the base table of the COUNT aggregate function exceeds about two billion rows.

Related Information

For more information about aggregate functions including COUNT, see Teradata Vantage™ - SQL Functions, Expressions, and Predicates, B035-1145.