FLOAT8
FLOAT8 is a data type used to store single-precision, floating-point numbers. This type can hold values up to 15 decimal digits long, with a range that supports positive, negative, and zero values. FLOAT8 provides higher precision and larger range than its counterpart, FLOAT4, making it appropriate for computations requiring advanced precision. The storage size required for FLOAT8 is 8 bytes.
Example
Output
Explanation
In this example, a table named FloatTest
is created with one column named floatColumn
of type FLOAT8
. A row is then inserted with the value 352.424
into floatColumn
. The selection query returns this value.
Example
Output
Explanation
In the example, a table named floats
is created with a single column my_float
of the FLOAT8
type. Then, one row is inserted into the floats
table with a FLOAT8
value of 12.734
. The SELECT
statement is executed to return all the data from the floats
table, which in this case is only the single row containing 12.734
.
Example
Output
Explanation
In the example, a variable num_test
of type FLOAT8
is declared and assigned the value 135.74. The dbms_output.Put_line
command is used to output the value of num_test
. It displays the statement “Value of num_test is 135.74”.