What is the best SQL data type for currency values? I'm using MySQL but would prefer a database independent type.
Mysql – Best data type for storing currency values in a MySQL database
MySQLsqlsqldatatypes
Related Topic
- Mysql – concatenate multiple MySQL rows into one field
- Mysql – Which MySQL data type to use for storing boolean values
- Mysql – Should I use the datetime or timestamp data type in MySQL
- Mysql – How to get a list of user accounts using the command line in MySQL
- Sql – How to UPDATE from a SELECT in SQL Server
- Sql – What are the options for storing hierarchical data in a relational database
- Mysql – How to get the sizes of the tables of a MySQL database
Best Answer
Something like
Decimal(19,4)
usually works pretty well in most cases. You can adjust the scale and precision to fit the needs of the numbers you need to store. Even in SQL Server, I tend not to use "money
" as it's non-standard.