COUNT_mode - Advanced SQL Engine - Teradata Database

Database Utilities

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
June 2020
Language
English (United States)
Last Update
2020-06-15
dita:mapPath
boh1556732696163.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1102
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

Determines the data type returned by COUNT operations.

Field Group

General

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.

Default

0

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 Topics

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