Visualizzazione dei risultati da 1 a 4 su 4

Discussione: Confronto tra tipi

  1. #1

    Confronto tra tipi

    Dal punto di vista dello spazio occupato è più conveniente creare un campo booleano che può anche valere null oppure creare un campo not null di tipo enum(true,false,null)?

  2. #2
    Come da manuale:

    BOOL, BOOLEAN
    These types are synonyms for TINYINT(1).

    TINYINT[(M)] [UNSIGNED] [ZEROFILL]
    A very small integer. The signed range is -128 to 127. The unsigned range is 0 to 255.

    The size of an ENUM object is determined by the number of different enumeration values. One byte is used for enumerations with up to 255 possible values. Two bytes are used for enumerations having between 256 and 65,535 possible values.

  3. #3
    Quindi è uguale?

  4. #4
    E quindi anche enum(bianco,nero) occupa lo stesso spazio di enum(bianco,nero,rosso,verde,giallo,blu)?

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.