The following table shows the contents of the SYSCONSTRAINTS system
table.
SYSCONSTRAINTS system table
For each column in the SYSCONSTRAINTS system table, this table provides its data type, its length in bytes, whether it is nullable, and a description of its contents.
Column Name
Type
Length
Nullable
Contents
CONSTRAINTID
CHAR
36
false
Unique identifier for constraint
TABLEID
CHAR
36
false
Identifier for table (join with SYSTABLES.TABLEID)
CONSTRAINTNAME
VARCHAR
128
false
Constraint name (internally generated if not specified
by user)
TYPE
CHAR
1
false
'P' (primary key), 'U' (unique), 'C'
(check), or 'F' (foreign key)
SCHEMAID
CHAR
36
false
Identifier for schema that the constraint belongs to (join
with SYSSCHEMAS.SCHEMAID)
STATE
CHAR
1
false
'E' (not deferrable initially immediate), 'i'
(deferrable initially immediate), or 'e' (deferrable initially
deferred)
REFERENCECOUNT
INTEGER
10
false
The count of the number of foreign key constraints that
reference this constraint; this number can be greater than zero only for PRIMARY
KEY and UNIQUE constraints