Null (SQL): Difference between revisions

Content deleted Content added
mNo edit summary
Ce
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 4:
In [[SQL]], '''null''' or '''NULL''' is a special marker used to indicate that a data value does not exist in the [[database]]. Introduced by the creator of the [[Relational model|relational]] database model, [[E.&nbsp;F. Codd]], SQL null serves to fulfil the requirement that all ''true relational database management systems ([[Relational database#RDBMS|RDBMS]])'' support a representation of "missing information and inapplicable information". Codd also introduced the use of the lowercase Greek [[omega]] (ω) symbol to represent null in [[database theory]]. In SQL, <code>NULL</code> is a [[List of SQL reserved words|reserved word]] used to identify this marker.
 
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 zero 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 Nullnull), and it would not be updated with the value "zero" until weit haveis ascertained that Adam owns no books.
 
In SQL, null is a marker, not a value. This usage is quite different from most programming languages, where a [[Null pointer|null value]] of a reference means it is not pointing to any [[Object (computer science)|object]].
 
== History ==