Check constraint: Difference between revisions

Content deleted Content added
bad check constraints
FrescoBot (talk | contribs)
m Bot: links syntax
Line 41:
== Common Restrictions ==
 
Most database management systems restrict check constraints to a single row, with access to constants and deterministic functions, but not to data in other tables, or to data invisible to the current transaction because of [[Transaction_isolation|transaction isolation]].
 
Such constraints are not truly ''table check constraints'' but rather ''row check constraints''. Because these constraints are generally only verified when a row is directly updated (for performance reasons,) and often implemented as implied INSERT or UPDATE triggers, integrity constraints could be violated by indirect action were it not for these limitations. Future, otherwise-valid modifications to these records would then be prevented by the CHECK constraint. Some examples of dangerous constraints include: