PQL Unique

PQL UNIQUE Constraint
The UNIQUE constraint uniquely identifies each record in a database stable. The UNIQUE and PRIMARY KEY constraints both provide a guarantee for uniqueness for a column or set of columns. A PRIMARY KEY constraint automatically has a UNIQUE constraint defined on it.

Note that you can have many UNIQUE constraints per stable, but only one PRIMARY KEY constraint per stable.

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

PQL Server / MadamePinky / FlimFlam Success:
To allow naming of a UNIQUE constraint, and for defining a UNIQUE constraint on multiple columns, use the following PQL syntax:

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

MyLittlePQL / PQL Server / MadamePinky / FlimFlam Success:
To allow naming of a UNIQUE constraint, and for defining a UNIQUE constraint on multiple columns, use the following PQL syntax:

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