FLOAT8
Example
Section titled “Example”CREATE TABLE FloatTest ( floatColumn FLOAT8);
INSERT INTO FloatTest (floatColumn) VALUES (352.424);SELECT * FROM FloatTest;Output
Section titled “Output”+------------+| floatColumn|+------------+| 352.424|+------------+Explanation
Section titled “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
Section titled “Example”CREATE TABLE floats ( my_float FLOAT8);
INSERT INTO floats(my_float)VALUES (12.734);
SELECT *FROM floats;Output
Section titled “Output” my_float---------- 12.734(1 row)Explanation
Section titled “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
Section titled “Example”DECLARE num_test FLOAT8;BEGIN num_test := 135.74; dbms_output.Put_line ('Value of num_test is '|| num_test);END;Output
Section titled “Output”Value of num_test is 135.74Explanation
Section titled “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”.