Null in Applications

Learn about the not-null constraint and the usage of null in applications.

The not null constraint

In some cases, we want a strong guarantee that a column cannot be null in our data model. Usually, that’s because it makes no sense for our application to deal with some unknowns. In other words, we want to know if we are dealing with a required value.

Evading the not null constraint

Unless we specify something else, the default value for any column is always null. However, it’s only a default value; it’s not a constraint on our data model, so our application may insert a null value in a column with a non-null default:

Get hands-on with 1200+ tech skills courses.