34
Views
7
Comments
Solved
which datatype is better to store dollar values in database -   Decimal or

which datatype is better to store dollar values in database -   Decimal or currency ?

2024-06-30 04-29-36
Priya Jhode
Solution

Hello, @Priya Naveen 

Use Decimal data type it's better to store dollar values in the database.

Best Regards,

-- Priya Jhode

2025-08-03 07-20-35
Mythily - EONE

Hi Priya,

You can choose Decimal datatype, Please refer this documentation FYR.

Click here


Thanks

2024-04-05 19-22-12
João Sousa

Hi there Priya,

You can choose whatever it suits best for your business requirements, since they are essentially the same, as described here:

"They are essentially the same. However, having a currency entity attribute will help you a bit while doing scaffolding patterns, as these fields will be automatically formatted as currency. And it kind of helps to document your data model, as you're adding a bit more information about the role of a specific attribute. "

KR,

João

2022-07-03 17-24-08
Sourabh sharma

Hi there Priya,

The same thought has came in my mind when I was saving the money value in my db .. I have created the decimal data type there I have faced the problem to do the formatting on that .. latter on I have changed into currency itself .. 

So suggestion is that you go for Currency data type 


Kind regards

2024-05-30 10-12-48
Anushka singh

Hello

 it is better to store dollar values using the **Decimal** datatype. This ensures precision and accuracy for financial calculations and avoids issues with rounding errors that can occur with floating-point types. The **Currency** datatype is not available  making **Decimal** the appropriate choice.

I hope it helps!

2019-01-07 16-04-16
Siya
 
MVP

As @João Sousa mentioned, both are essentially the same.

2025-01-09 14-56-57
IQ78

Use Currency for the sake of these benefits:

1. scaffolding

2. make your data model more clearer to read

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.