17.10 - MAXVALUE - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)
NO MAXVALUE
Maximum value to which a system-generated numeric series can increment.
Can be any whole number with a value greater than the value specified for START WITH.
The default is the maximum number for the data type defined for the column.
When cycling is not enabled, the sum of the specified values for START WITH and INCREMENT BY must be less than MAXVALUE. If they are not, then the system generates only one number before the maximum limit is exceeded.
  • If you specify a positive INCREMENT BY value, then MAXVALUE, if specified, must be a whole number such that MAXVALUE ≥ START WITH.
MAXVALUE also cannot be larger than the maximum value for the data type assigned to the identity column.
  • If you specify a negative INCREMENT BY value with CYCLE, then renumbering begins with MAXVALUE when MINVALUE is reached.
  • If you specify NO CYCLE, then MAXVALUE is not applicable for negative increments.
No warning or error is returned if you specify a MAXVALUE with NO CYCLE.