All the information about database integrity checks and rules is held in system tables. Use their corresponding system views as follows to access this information:
Each row in the SYS.SYSCONSTRAINT system view describes a constraint in the database. The constraints currently supported include table and column checks, primary keys, foreign keys, and unique constraints. See SYSCONSTRAINT system view.
For table and column check constraints, the actual CHECK condition is contained in the SYS.ISYSCHECK system table. See SYSCHECK system view.
|SYS.SYSCHECK||Each row in the SYS.SYSCHECK system view defines a check constraint listed in the SYS.SYSCONSTRAINT system view. See SYSCHECK system view.|
|SYS.SYSFKEY||Each row in the SYS.SYSFKEY system view describes a foreign key, including the match type defined for the key. See SYSFKEY system view.|
|SYS.SYSIDX||Each row in the SYS.SYSIDX system view defines an index in the database. See SYSIDX system view.|
Each row in the SYS.SYSTRIGGER system view describes one trigger in the database, including triggers that are automatically created for foreign key constraints that have a referential triggered action (such as ON DELETE CASCADE).
The referential_action column holds a single character indicating whether the action is cascade (C), delete (D), set null (N), or restrict (R).
The event column holds a single character specifying the event that causes the action to occur: A=insert and delete, B=insert and update, C=update, D=delete, E=delete and update, I=insert, U=update, M=insert, delete and update.
The trigger_time column shows whether the action occurs after (A) or before (B) the triggering event. See SYSTRIGGER system view.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|