DB2 Version 9.7 for Linux, UNIX, and Windows

SYSCAT.CHECKS catalog view

Each row represents a check constraint or a derived column in a materialized query table. For table hierarchies, each check constraint is recorded only at the level of the hierarchy where the constraint was created.

Table 1. SYSCAT.CHECKS Catalog View
Column Name Data Type Nullable Description
CONSTNAME VARCHAR (128)   Name of the check constraint.
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
TABSCHEMA VARCHAR (128)   Schema name of the table to which this constraint applies.
TABNAME VARCHAR (128)   Name of the table to which this constraint applies.
CREATE_TIME TIMESTAMP   Time at which the constraint was defined. Used in resolving functions that are part of this constraint. Functions that were created after the constraint was defined are not chosen.
QUALIFIER VARCHAR (128)   Value of the default schema at the time of object definition. Used to complete any unqualified references.
TYPE CHAR (1)   Type of check constraint:
  • C = Check constraint
  • F = Functional dependency
  • O = Constraint is an object property
  • S = System-generated check constraint for a GENERATED ALWAYS column
FUNC_PATH CLOB (2K)   SQL path in effect when the constraint was defined.
TEXT CLOB (2M)   Text of the check condition or definition of the derived column.1
PERCENTVALID SMALLINT   Number of rows for which the informational constraint is valid, expressed as a percentage of the total.
COLLATIONSCHEMA VARCHAR (128)   Schema name of the collation for the constraint.
COLLATIONNAME VARCHAR (128)   Unqualified name of the collation for the constraint.
COLLATIONSCHEMA_ORDERBY VARCHAR (128)   Schema name of the collation for ORDER BY clauses in the constraint.
COLLATIONNAME_ORDERBY VARCHAR (128)   Unqualified name of the collation for ORDER BY clauses in the constraint.
DEFINER2 VARCHAR (128)   Authorization ID of the owner of the constraint.
Note:
  1. In the catalog view, the text of the check condition is always shown in the database code page and can contain substitution characters. The check constraint will always be applied in the code page of the target table, and will not contain any substitution characters when applied. (The check constraint will be applied based on the original text in the code page of the target table, which might not include the substitution characters.)
  2. The DEFINER column is included for backwards compatibility. See OWNER.