SQL/MX 3.1 Reference Manual (H06.23+, J06.12+)
SQL/MX Language Elements
HP NonStop SQL/MX Release 3.1 Reference Manual—663850-001
6-35
Numeric Data Types
Exact numeric data types are types that can represent a value exactly: NUMERIC,
SMALLINT, INTEGER, LARGEINT, DECIMAL, and PICTURE COMMENT:.
Approximate numeric data types are types that do not necessarily represent a value
exactly: FLOAT, REAL, and DOUBLE PRECISION.
A column in an SQL/MP table declared with a floating-point data type is stored in
Tandem floating-point format and all computations on it are done assuming that.
SQL/MP tables can contain only Tandem floating-point data. For more information
about SQL/MP data types, see the SQL/MP Reference Manual.
A column in an SQL/MX table declared with a floating-point data type is stored in IEEE
floating-point format and all computations on it are done assuming that. SQL/MX tables
can contain only IEEE floating-point data. NonStop SQL/MX can select data from both
SQL/MP and SQL/MX tables. See default attribute Data Types on page 10-51 for
details.
NUMERIC [(precision [,scale])] [SIGNED|UNSIGNED]
specifies an exact numeric column, which can be SIGNED or UNSIGNED.
precision specifies the total number of digits and cannot exceed 128.
scale specifies the number of digits to the right of the decimal point and cannot
exceed precision.
For signed numbers with a precision up to 9 and unsigned numbers with a
precision of up to 18, the number is stored internally in binary and is supported in
hardware. In all other cases, the number is supported in software, which is less
efficient.
The default is NUMERIC (9,0) SIGNED.
SMALLINT [SIGNED|UNSIGNED]
specifies an exact numeric column—a two-byte binary integer, SIGNED or
UNSIGNED. The column stores integers in the range unsigned 0 to 65535 or signed
-32768 to +32767.
The default is SIGNED.
INT[EGER] [SIGNED|UNSIGNED]
specifies an exact numeric column—a four-byte binary integer, SIGNED or
UNSIGNED. The column stores integers in the range unsigned 0 to 4294967295 or
signed -2147483648 to +2147483647.
The default is SIGNED.










