PL/SQL supports a large number of numeric data type variations.
NUMBER, BINARY_INTEGER/PLS_INTEGER and BINARY_FLOAT/BINARY_DOUBLE.
NUMBER is the most generic data type.
It is used to support all but the most intensive scientific calculations.
Numbers can have a maximum of 38 significant digits. The syntax is :
declare variable1_nr NUMBER [(precision [, scale])]; ...
Both precision and scale are optional.
NUMBER data type is overloaded to include three different numeric groups:
To deal with numbers smaller than 10^-38 or larger than 10^38, you have to use scientific notation.
For example, 128000 should be written as 1.28E5.
declare v1_nr NUMBER(10); -- integer v2_nr NUMBER(10,0); -- also integer v3_nr NUMBER(5,5); -- fixed point v4_nr NUMBER(5,-3); -- also fixed point v5_nr NUMBER; -- floating point