In many contexts, a literal number is restricted to an integer literal. An integer has no fractional part and cannot include a decimal point. Built-in data types of SQL that can be exactly represented as literal integers include INT8, INT, SMALLINT, SERIAL, SERIAL8, and DECIMAL(p, 0).
If you use the representation of a number in a base other than 10 (such as a binary, octal, or hexadecimal) in any context where a literal integer is valid, the database server will attempt to interpret the value as a base-10 literal integer. For most data values, the result will be incorrect.
The following examples show some valid literal integers:
10 -27 +25567
Thousands separators (such as comma symbols) are not valid in literal integers, nor in any other literal number.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]