SQL NOT NULL

NOT NULL constraint is to specify that a column does not accept null value, ie, that column must always have some value, can not be empty.

Example SQL NULL

CREATE TABLE people { name varchar (255) NOT NULL, surname varchar (255) NOT NULL, nickname varchar (255) }

This statement creates a table called 'people', where we have 3 columns.

The columns 'name' and 'surname' are NOT NULL, this means that any row inserted in this table must have some value for the columns 'name' and 'surname'.