All databases include a mechanism for validating input. In a SQL context,
CHECK constraints allow you to specify a set of conditions a value must satisfy - for example, Column X should not be larger than Column Y.
Note: You should not use
CHECKconstraints to check for
NULLor enforce a foreign key relationship - there are specific constraints available for those purposes.
This section describes how to configure
CHECK constraints for various databases.