Each row in the SYSCONSTRAINT system view describes a named constraint in the database. The underlying system table for this view is ISYSCONSTRAINT.
Column name | Column type | Column constraint |
---|---|---|
constraint_id | UNSIGNED INT | NOT NULL |
constraint_type | CHAR(1) | NOT NULL |
ref_object_id | UNSIGNED BIGINT | NOT NULL |
table_object_id | UNSIGNED BIGINT | NOT NULL |
constraint_name | CHAR(128) | NOT NULL |
constraint_id The unique ID for the constraint.
constraint_type The type of constraint:
C - column check constraint.
T - table constraint.
P - primary key.
F - foreign key.
U - unique constraint.
ref_object_id The object ID of the column, table, or index to which the constraint applies.
table_object_id The table ID of the table to which the constraint applies.
constraint_name The name of the constraint.
PRIMARY KEY (constraint_id)
FOREIGN KEY (ref_object_id) references SYS.ISYSOBJECT (object_id)
FOREIGN KEY (table_object_id) references SYS.ISYSOBJECT (object_id)
UNIQUE (table_object_id, constraint_name)