Learn SQLite in 1 Day: Definitive Guide to Learn SQLite for Beginners by Krishna Rungta

Learn SQLite in 1 Day: Definitive Guide to Learn SQLite for Beginners by Krishna Rungta

Author:Krishna Rungta [Rungta, Krishna]
Language: eng
Format: azw3
Published: 2017-03-19T04:00:00+00:00


The query returns only the value 4. Which is the only value that exists in the departments table, and doesn't exist in the students table.

NULL handling

The "NULL" value is a special value in SQLite. It is used to represent a value that is unknown or missing value. Note that null value is totally different than "0" or blank "" value. Because 0 and the blank value is a known value, however, the null value is unknown.

NULL values require a special handling in SQLite, we will see now how to handle the NULL values.

Search for NULL values

You can't use the normal equality operator (=) to search the null values. For example, the following query searches for the students that have a null DepartmentId value:

SELECT * FROM Students WHERE DepartmentId = NULL;

This query won't give any result:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.