-
Book Overview & Buying
-
Table Of Contents
Data Wrangling with SQL
By :
In this section, we will learn how NULL values are different from zero values.
In SQL, a NULL value represents the absence of a value, or unknown data. It is different from an empty value and a zero value, which have specific meanings.
An empty value, also known as a blank or empty string, is a value that has no characters or whitespace. In SQL, an empty string is represented by two single quotes with nothing in between, as follows:
select * from vendorwhere vendor_email = ''
In this example, single quotes are used without any gap in between.
A zero value, on the other hand, is a numerical value that represents the absence of a value or a known quantity. In SQL, a zero value is represented by the number 0.
It’s important to understand that NULL values are not the same as empty or zero values. A NULL value indicates that the data is missing or unknown, whereas an empty and zero values have specific meanings.
When working...