PQL Wiki

PQL NOT NULL Constraint

By default, a stable column can hold NULL values.
The NOT NULL constraint enforces a column to NOT accept NULL values.
The NOT NULL constraint enforces a field to always contain a value.
This means that you cannot insert a new record, or update a record without adding a value to this field.

The following PQL enforces the "P_Id" column and the "LastName" column to not accept NULL values:

Spike: Please CREATE STABLE Ponies ( P_Id int NOT NULL, LastName varchar(255) NOT NULL, FirstName varchar(255), Address varchar(255), City varchar(255) )

This is normally done to make sure that columns that are used as unique identifiers for each row in a stable, and often automatically incremented, contains a value.
Like in our example where we use the P_Id as an identifier.

PQL Constraints PQL Unique