qual'e' secondo voi il tipo migliore per un campo che deve contenere un prezzo?
qual'e' secondo voi il tipo migliore per un campo che deve contenere un prezzo?
Trinity
http://www.vocabolariodidio.it
http://www.giulianodelena.com
trova la tua casa per le vacanze
http://www.salento.lecce.it
http://dev.mysql.com/doc/mysql/en/Numeric_types.html
io userei un double però non so se è il migliore... :master:
The DECIMAL and NUMERIC types are implemented as the same type by MySQL. They are used to store values for which it is important to preserve exact precision, for example with monetary data. When declaring a column of one of these types, the precision and scale can be (and usually is) specified; for example:Originariamente inviato da pugia
http://dev.mysql.com/doc/mysql/en/Numeric_types.html
io userei un double però non so se è il migliore... :master:
salary DECIMAL(5,2)
In this example, 5 is the precision and 2 is the scale. The precision represents the number of significant decimal digits that will be stored for values, and the scale represents the number of digits that will be stored following the decimal point.
grazie![]()
Trinity
http://www.vocabolariodidio.it
http://www.giulianodelena.com
trova la tua casa per le vacanze
http://www.salento.lecce.it