Could someone please explain the differences between the FLOAT and NUMBER datatypes? What situations would be good to use the FLOAT datatype?
Printable View
Could someone please explain the differences between the FLOAT and NUMBER datatypes? What situations would be good to use the FLOAT datatype?
In internal level of oracle DB no any difference: FLOAT = NUMBER(38)
Of course there is difference, FLOAT is a subtype of NUMBER!
When would I want to use the FLOAT subtype?
First question: About what language we are talking SQL or PL/SQL?Quote:
Originally posted by julian
Of course there is difference, FLOAT is a subtype of NUMBER!
If about SQL then,
Oracle has 3 classes of datatypes
-- Oracle Built-in datatypes (internal level) and, Julian, try to find FLOAT there.
-- ANSI (DB2...) datatypes and Oracle convert its into Built-in datatypes in any way. In this case u can declare FLOAT datatype
-- Oracle-Supplied Types.
If about PL/SQL then, u right
NUMBER has following subtypes for compatibility with ANSI/ISO and IBM types:
DEC, DECIMAL, DOUBLE PRECISION, FLOAT, INTEGER, INT, NUMERIC, REAL, SMALLINT.