When to use NULL in MySQL tables

后端 未结 11 1873
春和景丽
春和景丽 2020-11-29 22:59

I appreciate the semantic meaning of a NULL value in a database table, different from both false and the empty string \'\'. However, I have often read about performance pro

11条回答
  •  不知归路
    2020-11-29 23:28

    On some databases like Oracle, may be somethinkg on MySQL is true:

    • Nulls are not indexed, then if looking for null values can be bottleneck.
    • Trailing nulls on rows save space.

提交回复
热议问题