Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    [mysql] tipo per 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

  2. #2
    http://dev.mysql.com/doc/mysql/en/Numeric_types.html

    io userei un double però non so se è il migliore... :master:

  3. #3
    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:
    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:

    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

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.