Chapter 7 SQL Data Types
271
If precision is supplied, the FLOAT data type is either single or double
precision, depending on the value of precision specified. The cutoff between
REAL and DOUBLE is platform-dependent. Single precision FLOATs
require 4 bytes of storage, and double precision FLOATs require 8 bytes.
The FLOAT data type is an approximate numeric data type. It is subject to
roundoff errors after arithmetic operations. The approximate nature of
FLOAT values means that queries using equalities should generally be
avoided when comparing FLOAT values.
precision An integer expression that specifies the number of places after
the decimal.
♦
SQL/92 Compatible with SQL/92.
♦
Sybase You can tune the behavior of the FLOAT data type for
compatibility with Adaptive Server Enterprise, using the
"FLOAT_AS_DOUBLE option" on page 187.
"DECIMAL data type" on page 269
"REAL data type" on page 272
"DOUBLE data type" on page 270
INT or INTEGER data type [Numeric]
An integer value requiring 4 bytes of storage.
[ UNSIGNED ] { INT | INTEGER }
The INTEGER data type is an exact numeric data type; its accuracy is
preserved after arithmetic operations.
If you specify UNSIGNED; the integer can never be assigned a negative
number. By default, the data type is signed.
The range for signed integers is from ( -2e31)
to ( +2e31 -1 ).
The range for unsigned integers is from 0
to ( 2e32 - 1 ).
♦
SQL/92 Compatible with SQL/92. The UNSIGNED keyword is a
vendor extension.
♦
Sybase The signed data type is compatible with Adaptive Server
Enterprise. Adaptive Server Enterprise does not support the UNSIGNED
data type.
"BIGINT data type" on page 268
"TINYINT data type" on page 273
"SMALLINT data type" on page 273
Parameters
Standards and
compatibility
See also
Function
Syntax
Usage
Standards and
compatibility
See also