How many characters can you store with 1 byte?

前端 未结 4 1765
深忆病人
深忆病人 2020-12-12 19:20
1 byte = 8 bits 

So, does this mean 1 byte can only hold one character? E.g.:

\"16\" uses 2 bytes , \"9\" uses 1 byte , \"a\" uses          


        
4条回答
  •  轮回少年
    2020-12-12 19:50

    The syntax of TINYINT data type is TINYINT(M),

    where M indicates the maximum display width (used only if your MySQL client supports it).

    The (m) indicates the column width in SELECT statements; however, it doesn't control the accepted range of numbers for that field.

    A TINYINT is an 8-bit integer value, a BIT field can store between 1 bit, BIT(1), and 64 >bits, BIT(64). For a boolean values, BIT(1) is pretty common.

    TINYINT()

提交回复
热议问题