Icon Constraints Table

Structure
CREATE TABLE "Constraints"
(
"TableName" VARCHAR(40) COLLATE "ANSI_CI",
"Name" VARCHAR(40) COLLATE "ANSI_CI",
"Description" CLOB COLLATE "ANSI"
"Type" VARCHAR(15) COLLATE "ANSI_CI",
"EnforcingIndex" VARCHAR(40) COLLATE "ANSI_CI",
"TargetTable" VARCHAR(40) COLLATE "ANSI_CI",
"TargetTableConstraint" VARCHAR(40) COLLATE "ANSI_CI",
"UpdateAction" VARCHAR(15) COLLATE "ANSI_CI",
"DeleteAction" VARCHAR(15) COLLATE "ANSI_CI",
"CheckExpr" CLOB COLLATE "ANSI",
"ErrorCode" INTEGER,
"ErrorMessage" CLOB COLLATE "ANSI",
"CreateSQL" CLOB COLLATE "ANSI_CI",
"DropSQL" CLOB COLLATE "ANSI_CI"
)

CREATE INDEX "TableName" ON "Constraints"
("TableName")

CREATE INDEX "Name" ON "Constraints"
("Name")

CREATE INDEX "Type" ON "Constraints"
("Type")

CREATE INDEX "TargetTable" ON "Constraints"
("TargetTable")

Description
This table contains the defined constraints for the tables in an ElevateDB database.

The Type column values are as follows:

TypeDescription
Primary KeyThe constraint is a primary key constraint
Foreign KeyThe constraint is a foreign key constraint
UniqueThe constraint is a unique constraint
CheckThe constraint is a check constraint

The UpdateAction and DeleteAction column values are as follows:

ActionDescription
No ActionThis is the same as Restrict
CascadeNot supported currently
Set NullNot supported currently
Set DefaultNot supported currently
RestrictIf a primary key or unique constraint column is updated, then the update will be rejected if it violates any foreign key constraints

Related DDL Statements
StatementDescription
CREATE TABLECreates a new table
ALTER TABLEAlters an existing table
Image