Standard use of 'Z' instead of NULL to represent missing data?

前端 未结 8 564
借酒劲吻你
借酒劲吻你 2020-12-12 20:08

Outside of the argument of whether or not NULLs should ever be used: I am responsible for an existing database that uses NULL to mean "missing or never entered" da

8条回答
  •  抹茶落季
    2020-12-12 21:05

    While I have never seen 'Z' as a magic value to represent null, I have seen 'X' used to represent a field that has not been filled in. That said, I have only ever seen this in one place, and my interface to it was not a database, but rather an XML file… so I would not be prepared to use this an argument for being common practice.

    Note that we do have to handle the 'X' specially, and, as Dems mentioned, we do have to document it, and people have been confused by it. In our defence, this is forced on us by an external supplier, not something that we cooked up ourselves!

提交回复
热议问题