English 中文(简体)
这是无害的吗?[重复]
原标题:
  • 时间:2009-04-22 15:07:54
  •  标签:
最佳回答

They are lazy and do not understand the basic idea of a null in the database. Nulls are useful and have a purpose. They should neither be avoided nor used inappropriately.

问题回答

null意味着没有值,而0则不是,如果你看到一个0,你不知道它的意义,如果你看到一个null,你知道它是一个缺失值。

我认为空值更清晰,0和 令人困惑,因为它们不能清楚地显示存储的值的意图。

如果未指定,那么null是一个很好的指示器,零是有意义的,而null不是。我不是专业的数据库专家。

Despite the extra work that using nulls requires I think there SHOULD be a difference between a non specified field and a field set to empty or 0.

除了你,还有谁能说用户故意将值设置为0,或者他没有设置该字段?





相关问题
热门标签