FLOAT data type
Derby Reference Manual
199
Numeric floating point constants are limited to a length of 30 characters.
-- this example will fail because the constant is too long:
values 01234567890123456789012345678901e0;
Corresponding compile-time Java type
java.lang.Double
JDBC metadata type (java.sql.Types)
DOUBLE
When mixed with other data types in expressions, the resulting data type follows the rules
shown in
See also
.
Examples
3421E+09
425.43E9
9E-10
4356267544.32333E+30
FLOAT data type
The FLOAT data type is an alias for a REAL or DOUBLE PRECISION data type,
depending on the precision you specify.
Syntax
FLOAT [ (precision) ]
The default precision for FLOAT is 53 and is equivalent to DOUBLE PRECISION. A
precision of 23 or less makes FLOAT equivalent to REAL. A precision of 24 or greater
makes FLOAT equivalent to DOUBLE PRECISION. If you specify a precision of 0, you
get an error. If you specify a negative precision, you get a syntax error.
JDBC metadata type (java.sql.Types)
REAL or DOUBLE
Limitations
If you are using a precision of 24 or greater, the limits of FLOAT are similar to the limits of
DOUBLE.
If you are using a precision of 23 or less, the limits of FLOAT are similar to the limits of
REAL.
INTEGER data type
INTEGER provides 4 bytes of storage for integer values.
Syntax
{ INTEGER | INT }
Corresponding compile-time Java type
java.lang.Integer
JDBC metadata type (java.sql.Types)