Null (SQL)

NULL NULLsNVLCOALESCENOT NULLNULL marksnull valuenull valuesnullable
Null (or NULL) is a special marker used in Structured Query Language to indicate that a data value does not exist in the database.wikipedia
104 Related Articles

Relational model

relationalrelational data modelrelationships
Introduced by the creator of the relational database model, E. F. Codd, SQL Null serves to fulfil the requirement that all true relational database management systems (RDBMS) support a representation of "missing information and inapplicable information". E. F. Codd mentioned nulls as a method of representing missing data in the relational model in a 1975 paper in the FDT Bulletin of ACM-SIGMOD.
Codd himself, some years after publication of his 1970 model, proposed a three-valued logic (True, False, Missing/NULL) version of it to deal with missing information, and in his The Relational Model for Database Management Version 2 (1990) he went a step further with a four-valued logic (True, False, Missing but Applicable, Missing but Inapplicable) version.

Join (SQL)

joinjoinsInner join
Null has been the focus of controversy and a source of debate because of its associated three-valued logic (3VL), special requirements for its use in SQL joins, and the special handling required by aggregate functions and SQL grouping operators.
When the join-predicate is satisfied by matching non-NULL values, column values for each matched pair of rows of A and B are combined into a result row.

Data domain

domaindomain constraintsdomains
Since Null is not a member of any data domain, it is not considered a "value", but rather a marker (or placeholder) indicating the undefined value.
This gender column might be declared as a string data type, and allowed to have one of two known code values: "M" for male, "F" for female, and NULL for records where gender is unknown or not applicable.

Omega

ΩOmega (Ω)ω (omega)
Codd also introduced the use of the lowercase Greek omega symbol to represent Null in database theory.

Imieliński-Lipski algebra

Imieliński-Lipski Algebras
The groundbreaking work of T. Imieliński and W. Lipski Jr. (1984) provided a framework in which to evaluate the intended semantics of various proposals to implement missing-value semantics, that is referred to as Imieliński-Lipski Algebras.
An Imieliński-Lipski algebras is an extension of relational algebra onto tables with different types of null values.

Foreign key

Foreignforeign key constraintforeign key references
By default check constraints against foreign keys succeed if any of the fields in such keys are Null.
Since the purpose of the foreign key is to identify a particular row of referenced table, it is generally required that the foreign key is equal to the candidate key in some row of the primary table, or else have no value (the NULL value.

Relational algebra

joinJoin (relational algebra)relational logic
In particular a table containing any nulls is not equal with a natural self-join of itself, meaning that whereas is true for any relation R in relational algebra, a SQL self-join will exclude all rows having a Null anywhere.
The operators defined in this section assume the existence of a null value, ω, which we do not define, to be used for the fill values; in practice this corresponds to the NULL in SQL.

SQL syntax

Case (SQL)statementstwo flavours of conditional expressions
SQL provides two flavours of conditional expressions.
The concept of Null allows SQL to deal with missing information in the relational model.

Witold Lipski

W. LipskiW. Lipski Jr.
The groundbreaking work of T. Imieliński and W. Lipski Jr. (1984) provided a framework in which to evaluate the intended semantics of various proposals to implement missing-value semantics, that is referred to as Imieliński-Lipski Algebras.

Three-valued logic

ternary logicthree-valuedlaw of excluded fourth
Null has been the focus of controversy and a source of debate because of its associated three-valued logic (3VL), special requirements for its use in SQL joins, and the special handling required by aggregate functions and SQL grouping operators. Section 2.3 of his 1979 paper details the semantics of Null propagation in arithmetic operations as well as comparisons employing a ternary (three-valued) logic when comparing to nulls; it also details the treatment of Nulls on other set operations (the latter issue still controversial today).
The database structural query language SQL implements ternary logic as a means of handling comparisons with NULL field content.

Undefined value

value of "undefined
Since Null is not a member of any data domain, it is not considered a "value", but rather a marker (or placeholder) indicating the undefined value.

PL/SQL

PLSQLMetatranz StepSqlitePL/SQL (Oracle)
The procedural part of Oracle's PL/SQL supports BOOLEAN however variables; these can also be assigned NULL and the value is considered the same as UNKNOWN.
If a variable is not initialized then it defaults to NULL value.

Tomasz Imieliński

Tomasz Imielinski ImielińskiT. Imieliński
The groundbreaking work of T. Imieliński and W. Lipski Jr. (1984) provided a framework in which to evaluate the intended semantics of various proposals to implement missing-value semantics, that is referred to as Imieliński-Lipski Algebras.

Boolean data type

booleanBoolean variableBoolean value
When restricted by a constraint, the SQL BOOLEAN works like the Boolean type from other languages.
In SQL, which uses a three-valued logic for explicit comparisons because of its special treatment of Nulls, the Boolean data type (introduced in SQL:1999) is also defined to include more than two truth values, so that SQL Booleans can store all logical values resulting from the evaluation of predicates in SQL.

Check constraint

constraints constraintconstraints
The primary place in which SQL three-valued logic intersects with SQL Data Definition Language (DDL) is in the form of check constraints.
The result of the predicate can be either,, or, depending on the presence of NULLs.

Is functions

functionsISARRAY, ISSTRING, ISINTEGER, ISREAL, ISNUMERIC, ISDEF, ISUNDEF, ISEMPTY
(See functions for more on the functions in Transact-SQL.)

SQL

Structured Query LanguageSQL databaseSQL Databases
Introduced by the creator of the relational database model, E. F. Codd, SQL Null serves to fulfil the requirement that all true relational database management systems (RDBMS) support a representation of "missing information and inapplicable information". Null (or NULL) is a special marker used in Structured Query Language to indicate that a data value does not exist in the database.

Edgar F. Codd

E. F. CoddE.F. CoddCodd
Introduced by the creator of the relational database model, E. F. Codd, SQL Null serves to fulfil the requirement that all true relational database management systems (RDBMS) support a representation of "missing information and inapplicable information".

Relational database

relational database management systemRDBMSrelational databases
Introduced by the creator of the relational database model, E. F. Codd, SQL Null serves to fulfil the requirement that all true relational database management systems (RDBMS) support a representation of "missing information and inapplicable information".

Greek alphabet

GreekGreek lettersGreek letter
Codd also introduced the use of the lowercase Greek omega symbol to represent Null in database theory.

Database theory

relational database theorydatabasetheory
Codd also introduced the use of the lowercase Greek omega symbol to represent Null in database theory.

Reserved word

keywordkeywordsreserved keyword
In SQL, is a reserved word used to identify this marker.

Null pointer

nullnil
This usage is quite different from most programming languages, where null value of a reference means it is not pointing to any object.

Association for Computing Machinery

ACMAssociation for Computing Machinery (ACM)ACM Press
E. F. Codd mentioned nulls as a method of representing missing data in the relational model in a 1975 paper in the FDT Bulletin of ACM-SIGMOD.

SIGMOD

ACM SIGMODACM SIGMOD ConferenceSIGMOD Conference
E. F. Codd mentioned nulls as a method of representing missing data in the relational model in a 1975 paper in the FDT Bulletin of ACM-SIGMOD.