Reputation: 2080
I m reading some table in Oracle and i m looking like some times they are using "FLOAT" type or "NUMBER" for practicaly the same value
CREATE TABLE sensor_A
( sen_id NUMBER,
sen_Rating NUMBER, --here i m wating something like 12,9984
sen_mont DATE,
sen_value FLOAT(64), -- here im waiting too something like 0,83387
);
so what should i choose Float or Number when i want to save a number with decimals , is there a case where is better use one or other?
Thanks in advance, Enrique
Upvotes: 3
Views: 3398
Reputation: 172468
FLOAT is just an alias for NUMBER datatype in Oracle. So you can choose any of them, as they are just the synonym of each other.
See the Oracle docs:
FLOAT [(p)]
A subtype of the NUMBER datatype having precision p. A FLOAT value is represented internally as NUMBER. The precision p can range from 1 to 126 binary digits. A FLOAT value requires from 1 to 22 bytes.
Upvotes: 1