HPlogo ALLBASE/SQL Database Administration Guide: HP 3000 MPE/iX Computer Systems > Chapter 8  System Catalog

System.CheckDef

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

SYSTEM.CHECKDEF contains check constraint definitions. Initially, the table is empty. ALLBASE/SQL updates this table when processing a CREATE TABLE, ALTER TABLE, DROP TABLE, or TRANSFER OWNERSHIP statement involving a check constraint.

The text of the table check constraint comprising the search condition is stored in this table for each check constraint along with the constraint owner and constraint name. All other information about this constraint is in SYSTEM.CONSTRAINT.

SQLGEN also uses this table for recreating a CREATE TABLE statement containing check constraints.

Table 8-4 System.CheckDef

Column Name Type Length Description
CONSTRAINTNAMECHAR20Name of the constraint
OWNERCHAR20Owner of the constraint
COLUMNNAMECHAR20Column to which the constraint applies
SEGNUMINTEGER4Segment number
SEGLENINTEGER4Length of segment in bytes
CONDITIONSTRINGCHAR64Check constraint string segment

 

Example



   select constraintname, owner, columnname from system.checkdef;                  

   --------------------+--------------------+--------------------                  

   CONSTRAINTNAME      |OWNER               |COLUMNNAME                            

   --------------------+--------------------+--------------------                  

   SQLCON_00090000200  |PURCHDB             |



   ---------------------------------------------------------------------------

   Number of rows selected is 1

   U[p], d[own], l[eft], r[ight], t[op], b[ottom], pr[int] <n>,or e[nd]>





   select segnum, seglen, conditionstring from system.checkdef;                    

   -----------+-----------+--------------------------------------------------------

   SEGNUM     |SEGLEN     |CONDITIONSTRING                                         

   -----------+-----------+--------------------------------------------------------

             1|         14|salesprice> 0



   ---------------------------------------------------------------------------

   Number of rows selected is 1

   U[p], d[own], l[eft], r[ight], t[op], b[ottom], pr[int] <n>,or e[nd]> 


Feedback to webmaster