Integer data types
Integer types are exact data types. The system generates an error if a value of the input field cannot be expressed without loss of accuracy in the target table.
- Syntax
[+|-]<digit>…- Description
-
- Optional leading sign
- Unlimited leading zeros
- At least one decimal digit
- Limitations
-
- No thousands-separator commas
- No support for exponential notation
The following table describes integer handling.
| SQL type | Alias | Representation | Values |
|---|---|---|---|
| byteint | int1 | 1 byte, signed | Minimum value is -128. Maximum value is 127. |
| smallint | int2 | 2 bytes, signed | Minimum value is -32768. Maximum value is 32767. |
| integer | int or int4 | 4 bytes, signed | Minimum value is –2147483648. Maximum value is 2147483647. |
| bigint | int8 | 8 bytes, signed | Minimum value is –9223372036854775808. Maximum value is 9223372036854775807. |