What are the differences between Null, Zero and Blank in SQL?

后端 未结 4 1657
你的背包
你的背包 2020-12-22 14:14

Can someone please explain the differences between Null, Zero and Blank in SQL to me?

4条回答
  •  一向
    一向 (楼主)
    2020-12-22 14:26

    You may correlate NULL-BLANK-ZERO case by child birth scenario( A real life Example.).

    NULL Case: Child is not born yet.

    BLANK Case: Child is born but we didn't give any name to him

    ZERO Case: We defined it as zero, Child is born but of zero age. See how this data will look in a database table:

    Also NULL is a absence of value, where a field having NULL is not allocated any memory, where as empty fields have empty value with allocated space in memory.

提交回复
热议问题