Null value

From WikiMD's Food, Medicine & Wellness Encyclopedia

Null Value

A Null Value is a special marker used in Structured Query Language (SQL) to indicate that a data value does not exist in the database. Introduced by the creator of the relational database model, Edgar F. Codd, null value is a concept that addresses the absence of value or the presence of unknown value in the database.

Definition[edit | edit source]

In Database Management System (DBMS), null value is a condition that is used to represent the absence of any data value. It is important to note that a null value is different from a zero value or a field that contains spaces. A field with a null value is one that has been left blank during record creation.

Usage[edit | edit source]

Null values are used in SQL and other DBMS languages to handle situations where information is missing or not applicable. They can be the result of:

  • Initial creation of a table where some columns are optional.
  • Update of a table row that sets some columns to null.
  • A join operation that does not find a matching row.

Handling Null Values[edit | edit source]

In SQL, null values are handled differently than other values. SQL provides two special functions, IS NULL and IS NOT NULL, to test whether a particular value is null or not. It also provides the COALESCE function to replace null values with a specified value.

Null Value in Programming Languages[edit | edit source]

In many Programming Languages, such as Java, C++, and Python, null value is used to represent the absence of a value or to mark uninitialized variables. It is often used to denote the end of a list in data structures.

See Also[edit | edit source]

References[edit | edit source]

Wiki.png

Navigation: Wellness - Encyclopedia - Health topics - Disease Index‏‎ - Drugs - World Directory - Gray's Anatomy - Keto diet - Recipes

Search WikiMD


Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro) available.
Advertise on WikiMD

WikiMD is not a substitute for professional medical advice. See full disclaimer.

Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.


Contributors: Prab R. Tumpati, MD