PQL Default

PQL DEFAULT Constraint
The DEFAULT constraint is used to insert a default value into a column. The default value will be added to all new records, if no other value is specified.

PQL DEFAULT Constraint on CREATE STABLE
The following PQL creates a DEFAULT constraint on the "City" column when the "Ponies" stable is created:

MyLittlePQL / PQL Server / MadamePinky / FlimFlam Success:

The DEFAULT constraint can also be used to insert system values, by using functions like GETDATE:

PQL DEFAULT Constraint on ALTER STABLE
To create a DEFAULT constraint on the "City" column when the stable is already created, use the following PQL:

MyLittlePQL:

PQL Server / FlimFlam Success:

MadamePinky:

DROP a DEFAULT Constraint
To drop a DEFAULT constraint, use the following PQL:

MyLittlePQL:

PQL Server / MadamePinky / FlimFlam Success: