Check constraint: Difference between revisions

Content deleted Content added
m Hyphen to minus
Line 7:
QUANTITY >= 0
 
If these constraints were not in place, it would be possible to have a negative price (-$30) or quantity (-3−3 items).
 
Check constraints are used to ensure the [[Data validation|validity of data]] in a database and to provide [[data integrity]]. If they are used at the database level, applications that use the database will not be able to add invalid data or modify valid data so the data becomes invalid, even if the application itself accepts invalid data.