Field type suitable for saving currency in Oracle

-1

Is there any problem in saving data with a comma or period (.) in my database (SQL Developer)? What is the most appropriate variable to declare for currency (price) fields?

    
asked by anonymous 15.10.2016 / 01:58

2 answers

2

You can record any data in the database, it depends on what you want.

The correct column type for saving money is % with% of houses fixed . Example:

NUMBER(19, 4)

This allows 19 digits with 4 in the decimal part.

Be careful not to use wrong type and get hurt .

    
15.10.2016 / 05:12
0

To declare currency fields, you'd better use a Decimal / Numeric so you can set the decimal places.

Now for the field with commas or point you have to see the size of the field, if it is a larger text you should use a field of type Blob if you can not use a varchar. But you must be very careful when doing the queries.

    
15.10.2016 / 05:13