Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Money data type with 4 decimals acurracy

user455401Sep 8 2015 — edited Sep 9 2015

Hi,

I want to insert money values on a Oracle database and need an accuracy of four decimal places. Is NUMBER(19,4) the correct type?

Given this PL code:

create table foo (money_col number(19,4));

DECLARE

i PLS_INTEGER;

BEGIN

FOR i IN 1..10000 LOOP

    INSERT INTO FOO VALUES(i/10000);

END LOOP;   

COMMIT;

END;

/

Will it always insert 10.000 different numbers?

Thanks in advance,

Jose Luis

This post has been answered by SomeoneElse on Sep 8 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 7 2015
Added on Sep 8 2015
9 comments
1,736 views