Null (SQL): Difference between revisions

Content deleted Content added
No edit summary
Tags: Mobile edit Mobile app edit iOS app edit
Kelti (talk | contribs)
m Consistent wording
Line 6:
A null should not be confused with a value of 0. A null value indicates a lack of a value, which is not the same thing as a value of zero. For example, consider the question "How many books does Adam own?" The answer may be "zero" (we ''know'' that he owns ''none'') or "null" (we ''do not know'' how many he owns). In a database table, the [[Column (database)|column]] reporting this answer would start out with no value (marked by Null), and it would not be updated with the value "zero" until we have ascertained that Adam owns no books.
 
SQL null is a statemarker, not a value. This usage is quite different from most programming languages, where [[Null pointer|null value]] of a reference means it is not pointing to any [[Object (computer science)|object]].
 
== History ==