NULL values represent missing unknown data.
By default, table columns can store NULL values.
This chapter explains the IS NULL and IS NOT NULL operators.
SQL NULL value
If a column in the table is optional, then we can insert a new record or update an existing record without adding a value to the column record of. This means that the field will be saved with a NULL value.
NULL values are handled differently than other values.
NULL is used as a placeholder for unknown or inapplicable values.
Comments: NULL and 0 cannot be compared; they are not equivalent.
SQL NULL value processing
Please see the "Persons" table below:
| LastName | FirstName | Address | City | |
|---|---|---|---|---|
| Hansen | Ola | |||
| Svendson | Tove | Borgvn 23 | Sandnes | |
| Pettersen | Kari |
SQL IS NULLHow do we select only records with NULL values in the "Address" column? We must use the IS NULL operator:
| FirstName | Address | |
|---|---|---|
| Ola | ||
| Kari |
| LastName | FirstName | Address |
|---|---|---|
| Svendson | Tove | Borgvn 23 |
In the next section, we learn about ISNULL(), NVL(), IFNULL() and COALESCE() function.
Hot AI Tools
Undress images for free
Online AI tool for removing clothes from photos.
AI-powered app for creating realistic nude photos
AI image generator for creative art from text prompts.
AI powered investment research for smarter decisions
Hot Article
Hot Topics
20475
7
13607
4
Popular tool
Easy-to-use and free code editor
Chinese version, very easy to use
Powerful PHP integrated development environment
Visual web development tools
God-level code editing software (SublimeText3)












![Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]](https://img.php.cn/upload/course/000/000/035/5d27fb58823dc974.jpg)