Tuesday, April 27, 2021

Working With NULL Values in SQL

The NULL value is a data type that represents an unknown value. It is not equivalent to an empty string or zero. Suppose you have an employee table containing columns such as EmployeeId, Name, ContactNumber and an alternate contact number. This table has a few mandatory value columns like EmployeeId, Name, and ContactNumber. However, an alternate contact number is not required and therefore has an unknown value. Therefore a NULL value in this table represents missing or inadequate information. Here are other meanings NULL can have:

  • Value Unknown.
  • Value not available.
  • Attribute not applicable.

In this post, we will consider how NULL is used in creating tables, querying, string operations, and functions. Screenshots in this post come from the Arctype SQL Client.



from DZone.com Feed https://ift.tt/2R5ZHrO

No comments:

Post a Comment