Is the currency decimal type often used in actual development?

I usually use int for storage. The unit of data storage is divided into points. For example, for goods worth one yuan, it is 100 in the database. I think it"s simple and straightforward, and there"s no need to think about compatibility or anything.

do you use this decimal type much in your actual development? How do you usually store currency data?


the unit of data stored in the general banking system is


if the program related to finance, or according to the bill, or other highly sensitive to accuracy , generally use decimal

.
Menu