Cloudscape System Tables,
Page 3 of 17


[top]
[prev]
[next]
Documentation Top
Global Index
Reference Manual
TOC Index
Grammar index
Developer's Guide
TOC Index
Tuning Cloudscape
TOC Index

SYSCHECKS

Describes the check constraints within the current database.

Column Name Type Length Nullability Contents

CONSTRAINTID

CHAR

36

false

unique identifier for the constraint

CHECKDEFINITION

LONG VARCHAR

false

text of check constraint definition

REFERENCEDCOLUMNS

SERIALIZE(COM.
cloudscape.types.
ReferencedColumns
Descriptor
)

false

description of the columns referenced by the check constraint

Indexes

SYSCHECKS_INDEX1 unique BTREE index on (CONSTRAINTID)

Example Query

The following query returns the check constraints and the columns that they reference on table Flights:

SELECT CONSTRAINTNAME, COLUMNNAME 
FROM SYS.SYSTABLES t, SYS.SYSCOLUMNS col,
SYS.SYSCONSTRAINTS cons, SYS.SYSCHECKS checks
WHERE t.TABLENAME = 'FLIGHTS'
AND t.TABLEID = col.REFERENCEID
AND t.TABLEID = cons.TABLEID
AND cons.CONSTRAINTID = checks.CONSTRAINTID
AND REFERENCEDCOLUMNS.isReferencedColumn(col.COLUMNNUMBER)
ORDER BY CONSTRAINTNAME
[top]
[prev]
[next]


Cloudscape Version 3.0
For technical support, go to: www.cloudscape.com and click Support.
Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved.