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

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.