1The reverse of NULL. Tests for values that aren’t empty / NULL
2"Tests for empty (NULL) values.
3Example: Returns users that haven’t given a contact number.
4SELECT * FROM users
5WHERE contact_number IS NULL;"
1By default, a column can hold NULL values.
2The NOT NULL constraint enforces a column to NOT accept NULL values.
3This enforces a field to always contain a value, which means that you cannot insert a new record, or update a record without adding a value to this field.
4
5Sql NOT NULL in creating a table
6CREATE TABLE Persons (
7 ID int NOT NULL,
8 LastName varchar(255) NOT NULL,
9 FirstName varchar(255) NOT NULL,
10 Age int
11);