SYSCAT.TABCONST catalog view

Each row represents a table constraint of type CHECK, UNIQUE, PRIMARY KEY, or FOREIGN KEY. For table hierarchies, each constraint is recorded only at the level of the hierarchy where the constraint was created.

Table 1. SYSCAT.TABCONST Catalog View
Column Name Data Type Nullable Description
CONSTNAME VARCHAR (128)   Name of the constraint.
TABSCHEMA VARCHAR (128)   Schema name of the table to which this constraint applies.
TABNAME VARCHAR (128)   Unqualified name of the table to which this constraint applies.
OWNER VARCHAR (128)   Authorization ID of the owner of the constraint.
OWNERTYPE CHAR (1)  
  • S = The owner is the system
  • U = The owner is an individual user
TYPE CHAR (1)   Indicates the constraint type.
  • F = Foreign key
  • I = Functional dependency
  • K = Check
  • P = Primary key
  • U = Unique
ENFORCED CHAR (1)  
  • N = Do not enforce constraint
  • Y = Enforce constraint
TRUSTED CHAR (1)   If ENFORCED = 'N', specifies whether the data can be trusted to conform to the constraint.
  • N = Not trusted
  • Y = Trusted
  • Blank = Not applicable
CHECKEXISTINGDATA CHAR (1)  
  • D = Defer checking any existing data
  • I = Immediately check existing data
  • N = Never check existing data
ENABLEQUERYOPT CHAR (1)  
  • N = Query optimization is disabled
  • Y = Query optimization is enabled
DEFINER1 VARCHAR (128)   Authorization ID of the owner of the constraint.
PERIODNAME VARCHAR (128) Y Name of the period used to define this constraint.
PERIODPOLICY CHAR (1)   If a period name was specified, the constraint uses this period policy.
  • N = Not applicable
  • O = Period overlaps not allowed
REMARKS VARCHAR (254) Y User-provided comments, or the null value.
Note:
  1. The DEFINER column is included for backwards compatibility. See OWNER.